How can a ndis miniport driver find out the friendly name that you can see
under "My Network Places" for one of it's instances?

Re: Ndis names by Alex

Alex
Sun May 02 19:42:00 CDT 2004

In MiniportInitialize open the "WrapperConfigurationContext" with
"NdisOpenConfiguration"
Then read the NetCfgInstanceId value;
Then open "HKLM\SYSTEM\CurrentControlSet\Control\Network\??(first
key?)??\The value readed in the previous step\Connection
Then read the "Name" value.

Is this the right solution?


"Alex" <AlX@a> wrote in message
news:OuhpfjIMEHA.3332@TK2MSFTNGP10.phx.gbl...
> How can a ndis miniport driver find out the friendly name that you can see
> under "My Network Places" for one of it's instances?
>
>



Re: Ndis names by Alireza

Alireza
Mon May 03 04:50:16 CDT 2004

Alex, why do you need this name? One thing you should know is that this name
will -not- be available if UI has never been invoked. i.e.the display name
(a.k.a. ifAlias) is created the first time UI has to show the connection.
There is no guarantee that you can find the ifAlias (connection display
name) in the location below. As a matter of fact, very likely in LH you
won't see it there.

In LH, we will provide a way to query this name from NDIS.

-thanks, ali

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


"Alex" <AlX@a> wrote in message news:OMZ62dKMEHA.556@TK2MSFTNGP10.phx.gbl...
> In MiniportInitialize open the "WrapperConfigurationContext" with
> "NdisOpenConfiguration"
> Then read the NetCfgInstanceId value;
> Then open "HKLM\SYSTEM\CurrentControlSet\Control\Network\??(first
> key?)??\The value readed in the previous step\Connection
> Then read the "Name" value.
>
> Is this the right solution?
>
>
> "Alex" <AlX@a> wrote in message
> news:OuhpfjIMEHA.3332@TK2MSFTNGP10.phx.gbl...
> > How can a ndis miniport driver find out the friendly name that you can
see
> > under "My Network Places" for one of it's instances?
> >
> >
>
>



Re: Ndis names by Alex

Alex
Mon May 03 11:00:04 CDT 2004

Thanks
I only plan to use this for display, and if it's not available to use the
standard friendly adaptor name, so there shoudn't be any problems if the
name is not there.

"Alireza Dabagh [MS]" <alid@online.microsoft.com> wrote in message
news:uR2VSQPMEHA.2488@TK2MSFTNGP10.phx.gbl...
> Alex, why do you need this name? One thing you should know is that this
name
> will -not- be available if UI has never been invoked. i.e.the display name
> (a.k.a. ifAlias) is created the first time UI has to show the connection.
> There is no guarantee that you can find the ifAlias (connection display
> name) in the location below. As a matter of fact, very likely in LH you
> won't see it there.
>
> In LH, we will provide a way to query this name from NDIS.
>
> -thanks, ali
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Alex" <AlX@a> wrote in message
news:OMZ62dKMEHA.556@TK2MSFTNGP10.phx.gbl...
> > In MiniportInitialize open the "WrapperConfigurationContext" with
> > "NdisOpenConfiguration"
> > Then read the NetCfgInstanceId value;
> > Then open "HKLM\SYSTEM\CurrentControlSet\Control\Network\??(first
> > key?)??\The value readed in the previous step\Connection
> > Then read the "Name" value.
> >
> > Is this the right solution?
> >
> >
> > "Alex" <AlX@a> wrote in message
> > news:OuhpfjIMEHA.3332@TK2MSFTNGP10.phx.gbl...
> > > How can a ndis miniport driver find out the friendly name that you can
> see
> > > under "My Network Places" for one of it's instances?
> > >
> > >
> >
> >
>
>



Re: Ndis names by Stephan

Stephan
Mon May 03 13:06:55 CDT 2004

-> NdisMQueryAdapterInstanceName()

"A miniport driver uses NdisMQueryAdapterInstanceName to retrieve the
friendly name of an interface that the miniport driver controls."

http://msdn.microsoft.com/library/en-us/network/hh/network/103ndisx_82uq.asp

(Note: NDIS protocol drivers can use NdisQueryAdapterInstanceName()
(no 'M' in the name).)

Actually, it seems even the NDIS dev team sometimes doesn't know about
all the functions they created... ;)

Stephan
---
On Mon, 3 May 2004 02:50:16 -0700, "Alireza Dabagh [MS]"
<alid@online.microsoft.com> wrote:

>Alex, why do you need this name? One thing you should know is that this name
>will -not- be available if UI has never been invoked. i.e.the display name
>(a.k.a. ifAlias) is created the first time UI has to show the connection.
>There is no guarantee that you can find the ifAlias (connection display
>name) in the location below. As a matter of fact, very likely in LH you
>won't see it there.
>
>In LH, we will provide a way to query this name from NDIS.
>
>-thanks, ali

Re: Ndis names by Alex

Alex
Mon May 03 13:16:44 CDT 2004

NdisMQueryAdapterInstanceName will return just the adaptor name, and not the
user editable name visible under "My Network Places".

Yes, there is a NdisQueryAdapterInstanceName, and it's documented in DDK,
but:

> How can a ndis miniport driver find out the friendly name that you can see
> under "My Network Places" for one of it's instances?

so, I'm a miniport not a protocol, I don't have a "BindingHandle" to use
with NdisQueryAdapterInstanceName;


"Stephan Wolf" <stewo68@hotmail.com> wrote in message
news:ue2d90t912usnq3c1ge3693pja4ongmi4f@4ax.com...
> -> NdisMQueryAdapterInstanceName()
>
> "A miniport driver uses NdisMQueryAdapterInstanceName to retrieve the
> friendly name of an interface that the miniport driver controls."
>
>
http://msdn.microsoft.com/library/en-us/network/hh/network/103ndisx_82uq.asp
>
> (Note: NDIS protocol drivers can use NdisQueryAdapterInstanceName()
> (no 'M' in the name).)
>
> Actually, it seems even the NDIS dev team sometimes doesn't know about
> all the functions they created... ;)
>
> Stephan
> ---
> On Mon, 3 May 2004 02:50:16 -0700, "Alireza Dabagh [MS]"
> <alid@online.microsoft.com> wrote:
>
> >Alex, why do you need this name? One thing you should know is that this
name
> >will -not- be available if UI has never been invoked. i.e.the display
name
> >(a.k.a. ifAlias) is created the first time UI has to show the connection.
> >There is no guarantee that you can find the ifAlias (connection display
> >name) in the location below. As a matter of fact, very likely in LH you
> >won't see it there.
> >
> >In LH, we will provide a way to query this name from NDIS.
> >
> >-thanks, ali



Re: Ndis names by Alireza

Alireza
Mon May 03 14:52:05 CDT 2004

Stephan, the name Alex is looking for is the edit-able connection name in UI
(by default "Local Area Connection 1" or something like that.) This is what
is exposed as ifAlias for MIB purposes. The name you can get by calling
NdisQueryAdapterInstanceName if you are a protocol -or-
NdisMQueryAdapterInstanceName if you are a miniport, is the friendly name
that can not be changed. This name is exposed as ifDescr.

-ali

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


"Stephan Wolf" <stewo68@hotmail.com> wrote in message
news:ue2d90t912usnq3c1ge3693pja4ongmi4f@4ax.com...
> -> NdisMQueryAdapterInstanceName()
>
> "A miniport driver uses NdisMQueryAdapterInstanceName to retrieve the
> friendly name of an interface that the miniport driver controls."
>
>
http://msdn.microsoft.com/library/en-us/network/hh/network/103ndisx_82uq.asp
>
> (Note: NDIS protocol drivers can use NdisQueryAdapterInstanceName()
> (no 'M' in the name).)
>
> Actually, it seems even the NDIS dev team sometimes doesn't know about
> all the functions they created... ;)
>
> Stephan
> ---
> On Mon, 3 May 2004 02:50:16 -0700, "Alireza Dabagh [MS]"
> <alid@online.microsoft.com> wrote:
>
> >Alex, why do you need this name? One thing you should know is that this
name
> >will -not- be available if UI has never been invoked. i.e.the display
name
> >(a.k.a. ifAlias) is created the first time UI has to show the connection.
> >There is no guarantee that you can find the ifAlias (connection display
> >name) in the location below. As a matter of fact, very likely in LH you
> >won't see it there.
> >
> >In LH, we will provide a way to query this name from NDIS.
> >
> >-thanks, ali



Re: Ndis names by Alireza

Alireza
Mon May 03 14:55:58 CDT 2004

Alex, NdisQueryAdapterInstanceName called by protocols returns the same
name that NdisMQueryAdapterInstanceName called by miniports returns.
That will not help you as you already noticed.

-ali

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




Re: Ndis names by Stephan

Stephan
Tue May 04 06:24:50 CDT 2004

Ok. IIRC, the name returned is the one that was specified in the
card's .INF file, i.e. the "Device Name" shown in the network control
panel.

Stephan
---
On Mon, 3 May 2004 12:52:05 -0700, "Alireza Dabagh [MS]"
<alid@online.microsoft.com> wrote:

>Stephan, the name Alex is looking for is the edit-able connection name in UI
>(by default "Local Area Connection 1" or something like that.) This is what
>is exposed as ifAlias for MIB purposes. The name you can get by calling
>NdisQueryAdapterInstanceName if you are a protocol -or-
>NdisMQueryAdapterInstanceName if you are a miniport, is the friendly name
>that can not be changed. This name is exposed as ifDescr.
>
>-ali