Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with getting Mac address
Message
From
04/06/2012 08:05:22
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Problem with getting Mac address
Miscellaneous
Thread ID:
01545209
Message ID:
01545209
Views:
100
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 &&"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), "" )
		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,"")
Next
Reply
Map
View

Click here to load this message in the networking platform