I wanted to get the network interface name which gets stored under
hklm\system\currentcontrolset\control\network\connection\name, during the
initialization of my miniport driver. the read fails during the
initialization and when i disable/enable the interface, I am able to get the
registry key. So when does ndis update this registry entry?

thanks
sophia

RE: network interface name by pavel_a

pavel_a
Tue Apr 19 14:38:04 CDT 2005

"Sophia" wrote:
> I wanted to get the network interface name which gets stored under
> hklm\system\currentcontrolset\control\network\connection\name, during the
> initialization of my miniport driver.

AFAIK, miniports can not "get" registry keys under HKLM\CCS\Control ...
how do you do this?

> the read fails during the
> initialization and when i disable/enable the interface, I am able to get the
> registry key. So when does ndis update this registry entry?

What means "initialization"? DriverEntry or miniportInitialize?
--PA



Re: network interface name by Stephan

Stephan
Wed Apr 20 07:17:12 CDT 2005

> "Sophia" wrote:
> > I wanted to get the network interface name which gets stored under
> > hklm\system\currentcontrolset\control\network\connection\name,
during the
> > initialization of my miniport driver.

Try NdisMQueryAdapterInstanceName().

Stephan


Re: network interface name by Alireza

Alireza
Wed Apr 20 19:57:30 CDT 2005

NdisMQueryAdapterInstanceName() does not give you the "connection name" aka
ifAlias that the original poster is looking for.

I believe this was discussed in another thread some time ago.

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
news:1113999432.360540.137420@f14g2000cwb.googlegroups.com...
>> "Sophia" wrote:
>> > I wanted to get the network interface name which gets stored under
>> > hklm\system\currentcontrolset\control\network\connection\name,
> during the
>> > initialization of my miniport driver.
>
> Try NdisMQueryAdapterInstanceName().
>
> Stephan
>



Re: network interface name by Alireza

Alireza
Wed Apr 20 19:57:59 CDT 2005

Under current Windows version this name is not created till the UI is
invoked. this will change in Longhorn. What do you need it for?

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sophia" <Sophia@discussions.microsoft.com> wrote in message
news:AF827306-21C2-4B44-B823-DA70B1FB29A9@microsoft.com...
>I wanted to get the network interface name which gets stored under
> hklm\system\currentcontrolset\control\network\connection\name, during the
> initialization of my miniport driver. the read fails during the
> initialization and when i disable/enable the interface, I am able to get
> the
> registry key. So when does ndis update this registry entry?
>
> thanks
> sophia



Re: network interface name by Sophia

Sophia
Thu Apr 21 06:31:06 CDT 2005

I would need it to assign ip address during the customization part of sysprep
exercise (using netsh commands). Do you mean this entry is not created until
"network connections" gets invoked?

thanks

"Alireza Dabagh [MS]" wrote:

> Under current Windows version this name is not created till the UI is
> invoked. this will change in Longhorn. What do you need it for?
>
> -ali
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Sophia" <Sophia@discussions.microsoft.com> wrote in message
> news:AF827306-21C2-4B44-B823-DA70B1FB29A9@microsoft.com...
> >I wanted to get the network interface name which gets stored under
> > hklm\system\currentcontrolset\control\network\connection\name, during the
> > initialization of my miniport driver. the read fails during the
> > initialization and when i disable/enable the interface, I am able to get
> > the
> > registry key. So when does ndis update this registry entry?
> >
> > thanks
> > sophia
>
>
>

Re: network interface name by Alireza

Alireza
Fri Apr 22 02:49:12 CDT 2005

I am not sure what you mean by "network connection getting invoked".
Right click on network icon on your desktop and choose properties. You will
see a folder with connection.names. This is the UI that I am talking about.
The first time this UI comes up, these names are created.

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sophia" <Sophia@discussions.microsoft.com> wrote in message
news:C1E0C306-BA88-4796-9FBD-020C80F1B57E@microsoft.com...
>I would need it to assign ip address during the customization part of
>sysprep
> exercise (using netsh commands). Do you mean this entry is not created
> until
> "network connections" gets invoked?
>
> thanks
>
> "Alireza Dabagh [MS]" wrote:
>
>> Under current Windows version this name is not created till the UI is
>> invoked. this will change in Longhorn. What do you need it for?
>>
>> -ali
>>
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Sophia" <Sophia@discussions.microsoft.com> wrote in message
>> news:AF827306-21C2-4B44-B823-DA70B1FB29A9@microsoft.com...
>> >I wanted to get the network interface name which gets stored under
>> > hklm\system\currentcontrolset\control\network\connection\name, during
>> > the
>> > initialization of my miniport driver. the read fails during the
>> > initialization and when i disable/enable the interface, I am able to
>> > get
>> > the
>> > registry key. So when does ndis update this registry entry?
>> >
>> > thanks
>> > sophia
>>
>>
>>



Re: network interface name by Stephan

Stephan
Fri Apr 22 10:18:50 CDT 2005

I guess the OP talks about

"HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<NetCfgInstanceId>\Connection\Name"

..where "NetCfgInstanceId" is the GUID of the network card instance.

This name can actually be changed manually by the user (with sufficient
rights). So what exactly do you mean by "The first time this UI comes
up, these names are created"? Aren't these static entries?

Also, NDIS drivers can only open and access registry entries:

- in
"HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<xxxx>",
where "xxxx" is the instance number of the NDIS miniport, by using
NdisOpenConfiguration().

- below "HKLM\SYSTEM\CurrentControlSet\Services" by using
NdisOpenProtocolConfiguration().

NDIS miniports cannot open/access any other registry keys (unless they
use non-NDIS functions).

Stephan


Re: network interface name by Alireza

Alireza
Fri Apr 22 20:39:25 CDT 2005

Yes, I know where they are in the registry and yes they can be changed by
user.
What I meant to say is that unless you bring up the UI that shows these
names, they are not there. The first time the UI comes up, these names are
created and will be there from that point on.

You are correct about the fact that these are not accessible to miniport
drivers.
Both issues will be addressed in Longhorn. first the connections names (or
as we call them "ifAlias"'s) would be created at install time. Second, we
will provide a way for NDIS 6 miniports to query this name or will give it
to NDIS 6 miniports at initialization time.

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
news:1114183130.442082.44560@f14g2000cwb.googlegroups.com...
>I guess the OP talks about
>
> "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<NetCfgInstanceId>\Connection\Name"
>
> ..where "NetCfgInstanceId" is the GUID of the network card instance.
>
> This name can actually be changed manually by the user (with sufficient
> rights). So what exactly do you mean by "The first time this UI comes
> up, these names are created"? Aren't these static entries?
>
> Also, NDIS drivers can only open and access registry entries:
>
> - in
> "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<xxxx>",
> where "xxxx" is the instance number of the NDIS miniport, by using
> NdisOpenConfiguration().
>
> - below "HKLM\SYSTEM\CurrentControlSet\Services" by using
> NdisOpenProtocolConfiguration().
>
> NDIS miniports cannot open/access any other registry keys (unless they
> use non-NDIS functions).
>
> Stephan
>



Re: network interface name by Sophia

Sophia
Tue May 10 00:28:09 CDT 2005

now that i need to read the network connection name during the driver
initialization time, what should i be doing? i am working on windows 2003
server.

thanks

"Alireza Dabagh [MS]" wrote:

> Yes, I know where they are in the registry and yes they can be changed by
> user.
> What I meant to say is that unless you bring up the UI that shows these
> names, they are not there. The first time the UI comes up, these names are
> created and will be there from that point on.
>
> You are correct about the fact that these are not accessible to miniport
> drivers.
> Both issues will be addressed in Longhorn. first the connections names (or
> as we call them "ifAlias"'s) would be created at install time. Second, we
> will provide a way for NDIS 6 miniports to query this name or will give it
> to NDIS 6 miniports at initialization time.
>
> -ali
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
> news:1114183130.442082.44560@f14g2000cwb.googlegroups.com...
> >I guess the OP talks about
> >
> > "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<NetCfgInstanceId>\Connection\Name"
> >
> > ..where "NetCfgInstanceId" is the GUID of the network card instance.
> >
> > This name can actually be changed manually by the user (with sufficient
> > rights). So what exactly do you mean by "The first time this UI comes
> > up, these names are created"? Aren't these static entries?
> >
> > Also, NDIS drivers can only open and access registry entries:
> >
> > - in
> > "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<xxxx>",
> > where "xxxx" is the instance number of the NDIS miniport, by using
> > NdisOpenConfiguration().
> >
> > - below "HKLM\SYSTEM\CurrentControlSet\Services" by using
> > NdisOpenProtocolConfiguration().
> >
> > NDIS miniports cannot open/access any other registry keys (unless they
> > use non-NDIS functions).
> >
> > Stephan
> >
>
>
>

Re: network interface name by Alireza

Alireza
Tue May 10 22:48:10 CDT 2005

I do not have a solution for you. You may want to re-architect your
app/driver to remove dependency on this name.

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sophia" <Sophia@discussions.microsoft.com> wrote in message
news:A8B5A6A6-7C99-4FD4-A682-9AE2DFC7DA79@microsoft.com...
> now that i need to read the network connection name during the driver
> initialization time, what should i be doing? i am working on windows 2003
> server.
>
> thanks
>
> "Alireza Dabagh [MS]" wrote:
>
>> Yes, I know where they are in the registry and yes they can be changed by
>> user.
>> What I meant to say is that unless you bring up the UI that shows these
>> names, they are not there. The first time the UI comes up, these names
>> are
>> created and will be there from that point on.
>>
>> You are correct about the fact that these are not accessible to miniport
>> drivers.
>> Both issues will be addressed in Longhorn. first the connections names
>> (or
>> as we call them "ifAlias"'s) would be created at install time. Second, we
>> will provide a way for NDIS 6 miniports to query this name or will give
>> it
>> to NDIS 6 miniports at initialization time.
>>
>> -ali
>>
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
>> news:1114183130.442082.44560@f14g2000cwb.googlegroups.com...
>> >I guess the OP talks about
>> >
>> > "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<NetCfgInstanceId>\Connection\Name"
>> >
>> > ..where "NetCfgInstanceId" is the GUID of the network card instance.
>> >
>> > This name can actually be changed manually by the user (with sufficient
>> > rights). So what exactly do you mean by "The first time this UI comes
>> > up, these names are created"? Aren't these static entries?
>> >
>> > Also, NDIS drivers can only open and access registry entries:
>> >
>> > - in
>> > "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<xxxx>",
>> > where "xxxx" is the instance number of the NDIS miniport, by using
>> > NdisOpenConfiguration().
>> >
>> > - below "HKLM\SYSTEM\CurrentControlSet\Services" by using
>> > NdisOpenProtocolConfiguration().
>> >
>> > NDIS miniports cannot open/access any other registry keys (unless they
>> > use non-NDIS functions).
>> >
>> > Stephan
>> >
>>
>>
>>