MAC Address - Media Access Control Address
Yogesh Shetty <[email protected]> Wed, 19 Jun 2002 15:54:49 +0530
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <[email protected]> |
Alternatively u can try this...
WMI Script
=======
ManagementObjectSearcher Query = new ManagementObjectSearcher("SELECT *
FROM Win32_NetworkAdapter WHERE AdapterType = 'Ethernet 802.3'");
ManagementObjectCollection ResultSet = Query.Get();
-----Original Message-----
From: The DOTNET list will be retired 7/1/02 [
<mailto:[email protected]> mailto:[email protected]]
On Behalf Of Marsh, Drew
Sent: Wednesday, June 19, 2002 4:06 AM
To: <mailto:[email protected]> [email protected]
Subject: Re: [DOTNET] MAC Address - Media Access Control Address
> Various searches on help and the dot net mails have drawn a bit of a
> blank:
>
> How do you get the MAC address as previously derived from:
>
> Private Declare Function Netbios Lib "netapi32.dll" _
> (pncb As NET_CONTROL_BLOCK) As Byte
>
>
> Under VB.Net?
Did you try just typing that in? It's exactly the same. :)
The only thing that's (potentially) different is the mapping of the NCB
structure. Depending on it's complexity, which I don't recall and don't
have time check right now, it may also just as straight forward.
Otherwise you may need to use the StructLayout and FieldOffset
attributes.
HTH,
Drew
[ .NET MVP | weblog: <http://radio.weblogs.com/0104813/>
http://radio.weblogs.com/0104813/ ]
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at
<http://discuss.develop.com> http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.