Network adapter NetCfgInstanceId thru .NET




Is there a way to get the netcfginstanceid of a network adapter thru C#? I
couldnt find any available classes that might do the trick. The
netcfginstanceid is available in the registry key
One/more of the xxx's will have the network adapter in the system. The
"NetCfgInstanceId" in this xxx is what I am looking for. I cant directly go
to the registry and pick it up because I do not have any information about
the adapter I am interested in except its name. I cant use the name because
there can be multiple adapters in this registry key with the same name.

I know the INetCfg* component classes will enumerate all & give me the one I
am interested in but I dont want to use C++ and do interop if that is


Dave Sexton

Hi Sushrut

Is the System.Net.NetworkInformation.NetworkInterface.Id property what you are looking for?

(.NET 2.0 Framework only)

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question