Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with getting Mac address
Message
De
04/06/2012 08:05:22
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Problem with getting Mac address
Divers
Thread ID:
01545209
Message ID:
01545209
Vues:
105
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,"")
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform