Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lcmacaddress and VISTA
Message
From
28/08/2008 11:38:00
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01342562
Message ID:
01342596
Views:
7
>>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
Map
View

Click here to load this message in the networking platform