Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to read ethernet card ID or MAC ID from VFP
Message
De
22/09/2004 07:52:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00944914
Message ID:
00944920
Vues:
14
>Hi All,
>i wantto keep client pc ethernet mac addres infos on the server pc. application will install to the each client pc at the termial registration time i'll store the client pc MAC info to the eg MACINFO.DBF table . How can read directly this information several OS w9x,NT,2000,XP ?
>
>TIA
Local pGUID,rGUID,lcOldError, lnResult
Declare integer CoCreateGuid in 'OLE32.dll' string @pguid
Declare integer StringFromGUID2 in 'OLE32.dll' ;
  string rguid, string @lpsz, integer cchMax
Declare integer UuidCreateSequential in 'RPCRT4.dll'  string @ Uuid

pGUID=replicate(chr(0),16)
rGUID=replicate(chr(0),80)

lcOldError = On('error')
On Error lnResult = CoCreateGuid(@pGUID)
lnResult = UuidCreateSequential(@pGUID) 
On Error &lcOldError

return substr( iif( lnResult = 0 and ;
	StringFromGUID2(pGUID,@rGUID,40) # 0, ;
    StrConv(left(rGUID,76),6), "" ), 26,12)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform