473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Network adapter NetCfgInstanceId thru .NET

Hi,

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
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\xxx".
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
possible.

Rgds,
Sushrut.
Jul 21 '06 #1
1 4718
Hi Sushrut

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

(.NET 2.0 Framework only)

--
Dave Sexton

"Sushrut" <Su*****@discussions.microsoft.comwrote in message news:09**********************************@microsof t.com...
Hi,

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
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\xxx".
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
possible.

Rgds,
Sushrut.

Jul 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matthew K Jensen | last post by:
In one of my "because I can" projects, I want to be able to see the enabled network interfaces on a machine. I have no clue as to how to do this. Any suggestions?
1
by: genetic.error | last post by:
I installed VS.NET 2003 on Windows 2000 Pro SP3. Since doing so, I have no internet connection. Also, I have no access to my home network. I've done everything I can think of to correct the...
3
by: hitchiker | last post by:
hello i have a little difficult problem searchengines could not help me yet i have 2 zigbee (standard for wireless personal area networking, such as bluetooth) cards, connected to the pc's via...
1
by: Misha | last post by:
How do i get the name of the network card in C#?
8
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this...
0
by: BLUE | last post by:
Enable and Disable in the Network and DialUp Connections manager is actually setting a bit in the registry for the target adapter and then calling NDIS to unbind or bind (depending on whether your...
11
by: weird0 | last post by:
I am a beginner to socket programming to in c#. I know the concepts as to how to program them. I get the above exception when i tried writing the code for the server side on the line...
4
by: =?Utf-8?B?TWFydGlu?= | last post by:
In Device Manager under Network Adapters, nearly all (about 20) items have a yellow warning symbol. The first item, Microsoft 6to4 Adapter says driver is up-to-date BUT says "This device is not...
0
by: Eran.Yasso | last post by:
Hi all, The following code sets/disables network adpter's status. Since I have no idea where to put this code and I wish to share the community with it. I did rverse engineering from VBS to C#....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.