General information
Category:
Coding, syntax & commands
>>Hi all,
>>lcmacaddress (Ethernet serial number) does not work on VISTA. Is there new code for this?
>>Thanks
>
>What is your code?
Hi Borislav, thank you for reply. This code below
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 "5." $ OS() && 2000/XP
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), "" )
* VFP7
* CLEAR DLLS 'UuidCreateSequential'
Else
lcMacAddress = iif( CoCreateGuid(@pGUID) = 0 ;
and StringFromGUID2(pGUID,@rGUID,40) # 0, ;
substr(StrConv(left(rGUID,76),6),26,12), "" )
ENDIF
? lcMacAddress
*VFP7
*CLEAR DLLS 'WNetGetUser','GetComputerName','CoCreateGuid','StringFromGUID2'
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only