Thank you "vfp mac address" worked better... :)
http://fox.wikis.com/wc.dll?Wiki~RetrievingHardwareInformation>>Hi All,
>>I find this code from UT. I use it for copy-protect. But I have trouble with notebooks with this code. I think so It's about wireless ethernet. I tried to get information with when wireless working and without, no succeeded.
>>
>>Any idea?
>>
>> Local pGUID,rGUID
>> Declare Integer CoCreateGuid In 'OLE32.dll' ;
>> string @pguid
>> Declare Integer StringFromGUID2 In 'OLE32.dll' ;
>> string rguid, String @lpsz, Integer cchMax
>> pGUID=Replicate(Chr(0),16)
>> rGUID=Replicate(Chr(0),80)
>> If Val(Os(3))>=5
>> Declare Integer UuidCreateSequential In 'RPCRT4.dll' String @ Uuid
>> lcMacAddress = Iif( UuidCreateSequential(@pGUID) = 0 ;
>> and StringFromGUID2(pGUID,@rGUID,40) # 0, ;
>> substr(Strconv(Left(rGUID,76),6),26,12), "" )
>> Else
>> lcMacAddress = Iif( CoCreateGuid(@pGUID) = 0 ;
>> and StringFromGUID2(pGUID,@rGUID,40) # 0, ;
>> substr(Strconv(Left(rGUID,76),6),26,12), "" )
>> Endif
>> lcinfstr=m.lcinfstr + Nvl(lcMacAddress,"")
>>
>
>Without looking at your code at all, bear in mind that most modern PCs have multiple network MAC addresses. For example, the computer I'm using right now has 7:
>
>- Two hardwire gigabit adapters
>- One VirtualBox virtual adapter
>- Four tunnel adapters (these all have a MAC address of 00-00-00-00-00-00-00-E0 so they can be identified)
>
>And, this computer doesn't even have any wireless!
>
>If your code asks for just a single MAC address, I'm not sure you can reliably know which one you're getting. I'm pretty sure you need to enumerate all of the MAC addresses, then check if any of them is the one you want.
>
>I think there was a discussion here some time ago about this but I can't search. Maybe someone else can, if not maybe Googling [vfp enumerate mac addresses] can help.