Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to retrieve a NIC Mac Address and its IP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00996178
Message ID:
00996442
Vues:
33
>Hugo,
>Thank you for the reply. I have to tell you that I am acctually not using VFP. I am using .NET but the methods seemed so similar. I noticed after reading your post again that you query Win32_NetworkAdapter in VFP. I query Win32_NetworkAdapterConfiguration in .NET which I guess does not expose NetConnectionID or AdapterTypeID.
>
>Does NetConnectionID return Local Area Connection and Local Area Connection 2 if you have 2 LAN connections?
>
>I guess I have to research more what the difference in method between VFP and .NET
>
>Einar

Oh, in the first sample I queried NetworkAdapterConfiguration too, in particular because I can query in it about IPEnabled and the Domain where it is connected. In this second case, you wanted the name of the connection as it appears in the control panel, so for that I needed NetworkAdapter class (I found the name of some WMI clases somehow deceiving...). In my case it returns: 1394 Connection and Local Area Connection 2, which are the 2 ethernet cards (I added it to the query)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform