Hi.

Can you tell me, please,
how to get device's oryginal name.
The name that is assigned during PnP enumeration.
E.g.:
After I plug FM801 PCI joystick,
I see such in the Device Manager and in the registers.
When I install some driver to it,
I see only new name.
I tried a lot with SetupDi functions
but I could not get the oryginal value.
I thought that getting devices SPDRP_FRIENDLYNAME
property will solve the problem but
in most cases this call fails.

When I was testing WInDriver,
I saw that this tool can see oryginal name
of the device.

Thanks in advance,
Grzegorz

Re: oryginal name of the device by Don

Don
Wed Nov 16 07:48:39 CST 2005

See SetupDiGetDeviceRegistryProperty( SPDRP_DEVICEDESC


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply




"knurgb" <gb@gazeta.pl> wrote in message
news:1132147187.077404.67340@g14g2000cwa.googlegroups.com...
>
> Hi.
>
> Can you tell me, please,
> how to get device's oryginal name.
> The name that is assigned during PnP enumeration.
> E.g.:
> After I plug FM801 PCI joystick,
> I see such in the Device Manager and in the registers.
> When I install some driver to it,
> I see only new name.
> I tried a lot with SetupDi functions
> but I could not get the oryginal value.
> I thought that getting devices SPDRP_FRIENDLYNAME
> property will solve the problem but
> in most cases this call fails.
>
> When I was testing WInDriver,
> I saw that this tool can see oryginal name
> of the device.
>
> Thanks in advance,
> Grzegorz
>



Re: oryginal name of the device by knurgb

knurgb
Wed Nov 16 09:13:23 CST 2005

Nope.
This is value from (in case of PCI device)
System\CurrentControlSet\Enum\PCI\ID-1\ID-2\DeviceDesc

I wonder if I must ask directly BUS driver for enumerating
its devices...

Don Burn napisal(a):
> See SetupDiGetDeviceRegistryProperty( SPDRP_DEVICEDESC
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
>
> "knurgb" <gb@gazeta.pl> wrote in message
> news:1132147187.077404.67340@g14g2000cwa.googlegroups.com...
> >
> > Hi.
> >
> > Can you tell me, please,
> > how to get device's oryginal name.
> > The name that is assigned during PnP enumeration.
> > E.g.:
> > After I plug FM801 PCI joystick,
> > I see such in the Device Manager and in the registers.
> > When I install some driver to it,
> > I see only new name.
> > I tried a lot with SetupDi functions
> > but I could not get the oryginal value.
> > I thought that getting devices SPDRP_FRIENDLYNAME
> > property will solve the problem but
> > in most cases this call fails.
> >
> > When I was testing WInDriver,
> > I saw that this tool can see oryginal name
> > of the device.
> >
> > Thanks in advance,
> > Grzegorz
> >


Re: oryginal name of the device by Eliyas

Eliyas
Thu Nov 17 17:50:02 CST 2005

What you are seeing is the name reported by the bus driver in response to
IRP_MN_QUERY_DEVICE_TEXT. This text is used by the system as the device
description until it finds the function driver for the device. Once the
function driver is loaded, it gets replaced by the DeviceDesc from the INF
file or if there are any class/coinstaller they could write a friendly name
for the device.

Unfortunately the original text provided by the bus doesn't get stored in
the registry anywhere and there are no APIs to query the bus directly and
get that.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx



Re: oryginal name of the device by knurgb

knurgb
Fri Nov 18 01:18:19 CST 2005


Thanks for the answer.

Just let me tell how could I achieve this:
Create some utility driver and install it in the system.
In this driver implement some function (available via IOCTL)
that will enumerate bus drivers (hmm...) and pass to everyone
prepared IRP ( with IRP_MN_QUERY_DEVICE_TEXT)?

Is that right?
I am not sure if I am able to enumerate
BUS driver from inside the driver.

Regards,
Grzegorz


Re: oryginal name of the device by Eliyas

Eliyas
Fri Nov 18 09:07:00 CST 2005

Your approach wouldn't work. You can't enumerate a hardware bus yourself!
Unless you write a bus filter and attach to every single PDO enumerated by
the bus, you cannot send this irp. I wouldn't recommend writing a bus filter
either because it not easy to do and there are no publicly availabe sample
or documentation. Why is it so important for you to get the name provided by
the device? Why don't you write a coinstaller and write a friendly name of
the device that matches your device name? Device manager shows first shows
friendlyname if it exists and if that doesn't exist it shows DeviceDesc.

--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx