PDA

Click to See Complete Forum and Search --> : get ID of LAN Card?


fifo
Feb 25th, 2007, 07:14 PM
Hi, experts

How can I get some information about my LAN card?

this information is important for me. Please tell me how.

Hack
Feb 26th, 2007, 06:04 AM
Moved from the CodeBank

Negative0
Feb 26th, 2007, 11:07 AM
You can use WMI to get information about your network adapter:

ManagementObjectSearcher objQuery = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration");

foreach (ManagementObject objMO in objQuery.Get())
if ((bool) objMO["IPEnabled"] && objMO["MacAddress"] != null)
MessageBox.Show ((string) objMO["Description"] + " - " + (string) objMO["MacAddress"]);

fifo
Feb 27th, 2007, 10:16 PM
another easier way?

I dont know exactly a way that use Network namespace to solution this problem.

Any idea?