USB PnP recognition and registry keys

device driver

    Sponsored Links

    Next

  • 1. Printer Drivers
    I found many books about Writing Windows Device Drivers, but none talk about printer drivers. Where could I find good reference on how a printer driver works and how to code one?
  • 2. Checked build driver with free build OS....
    Hi, I know, to help debugging, its required to have the windows checked build and with checked build driver (driver under development). But what happens if checked build driver is loaded and used with free build os ? (XP SP2). As far as I know, the checked build driver 1. Does not have optimization enabled 2. Lots of DbgPrint 3. The size of the binary is huge (because of symbols and etc). 3. The driver will be slow. Are there anything more to add to the above list ? If I manage to remove all the prints and if the driver is meeting the performance criterion, is it advisable to deploy the checked build driver with free build OS ? Regards Esha
  • 3. SCSI miniport-Custom Log messages
    Hi, Is it possible to generate custom error log messages for SCSI miniport driver? I tried the following but no luck: 1. Created a message (.mc) file, compiled and generated a corresponding .rc and .bin file, as per WDK and sample code. 2. Updated .inf file for event log as mentioned in the WDK and added .sys file to look for messages. 3. Calling StorPortLogError() with this custom error ID. After installing this driver, an event is getting logged in the event log, however it complains that it鈥檚 not able to find the description. The following message is displayed in the description instead of my custom error message. 鈥淭he description for Event ID ( 11 ) in Source (xyz) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: \Device\RaidPort8. " Is it possible to have custom error messages in storport-miniport driver? If so could some one please point out the missing thing in the above steps? Thanks, Indira
  • 4. Device Manager/Properties/Power Management Tab
    Here is the question On a given platform with 1. a recent PCIe Network Card and SW created by a division in my company, and 2. slightly (?) modified PCIe Network Si and slightly (modified) SW by me Why (or what should I check why) would the power management tab appear in device manager properties on device 1 above but not on device manager properties of device 2? Thanks

USB PnP recognition and registry keys

Postby Manfred Wilner » Thu, 01 Jul 2004 03:20:09 GMT

This are the strings we send on PnP over the USB.



Device string sent for Manufacturer "Manufacturer AB" (in UNICODE)
Device string sent for Model "My Printer" (in UNICODE)
Printer Class command GET_DEVICE_ID "MANUFACTURER:Manufacturer AB;COMMAND
SET:None;MODEL:My Printer;CLASS:PRINTER;DESCRIPTION:USB Ticket Printer My
Printer;" (IEEE 1284 PnP)



My question is:

From what strings are the Registry keys generated? Both manufacturer and
product/model can be read from either the PnP string or the USB string
requests.



When I plugin the printer, Windows XP respond with a baloon text taken from
the PnP string and that is not looking too nice:



Found new hardware

ManufacturerABMy Printer



I would prefere to have it look like:



Found new hardware

Manufacturer AB, My Printer



I can do this by changing the PnP fields and insert a ", " in the
manufacturer field, or in the model field. But I can only do this if the INF
and registry entrys is not using the PnP string.



The second issue is when the "Found new hardware wizard" comes up. It still
displays "ManufacturerABMy Printer" and regarding to the PnP specification
"Plug and Play Parallel Port Devices", Version 1.0b, March 15, 1996 (didn't
found any newer spec.) the wizard should show the DESCRIPTION field of the
PnP string if no INF file could be found.



Is the PnP fields just informative Text, or are they used in the Key
generation?



Any comments and ideas welcome.



/Manfred





RE: USB PnP recognition and registry keys

Postby johnei » Fri, 02 Jul 2004 03:19:20 GMT

Hi, Manfred

The DDK specialist most familiar with this area is not able to respond at
this time. You should receive a response by close of business on Thursday,
Pacific time.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided S ISwith no warranties, and confers no rights.

--------------------
From: "Manfred Wilner"<< XXXX@XXXXX.COM >>
Subject: USB PnP recognition and registry keys
Date: Tue, 29 Jun 2004 14:20:09 -0400
X-Tomcat-NG: microsoft.public.development.device.drivers

This are the strings we send on PnP over the USB.



Device string sent for Manufacturer "Manufacturer AB" (in UNICODE)
Device string sent for Model "My Printer" (in UNICODE)
Printer Class command GET_DEVICE_ID "MANUFACTURER:Manufacturer AB;COMMAND
SET:None;MODEL:My Printer;CLASS:PRINTER;DESCRIPTION:USB Ticket Printer My
Printer;" (IEEE 1284 PnP)



My question is:

From what strings are the Registry keys generated? Both manufacturer and
product/model can be read from either the PnP string or the USB string
requests.



When I plugin the printer, Windows XP respond with a baloon text taken from
the PnP string and that is not looking too nice:



Found new hardware

ManufacturerABMy Printer



I would prefere to have it look like:



Found new hardware

Manufacturer AB, My Printer



I can do this by changing the PnP fields and insert a ", " in the
manufacturer field, or in the model field. But I can only do this if the INF
and registry entrys is not using the PnP string.



The second issue is when the "Found new hardware wizard" comes up. It still
displays "ManufacturerABMy Printer" and regarding to the PnP specification
"Plug and Play Parallel Port Devices", Version 1.0b, March 15, 1996 (didn't
found any newer spec.) the wizard should show the DESCRIPTION field of the
PnP string if no INF file could be found.



Is the PnP fields just informative Text, or are they used in the Key
generation?



Any comments and ideas welcome.



/Manfred





{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Hi, Manfred
\par
\par The DDK specialist most familiar with this area is not able to respond at this time. You should receive a response by close of business on Thursday, Pacific time.
\par
\par Thank you for choosing the MSDN Managed Newsgroups,
\par
\par John Eikanger
\par Microsoft Developer Support
\par
\par This posting is provided \ldblquote AS IS\rdblquote with no warranties, and confers no rights.
\par
\par \pard\li720 --------------------
\par From: "Manfred Wilner"<< XXXX@XXXXX.COM >>
\par Subject: USB PnP recognition and registry keys
\par Date: Tue, 29 Jun 2004 14:20:09 -0400
\par X-Tomcat-NG: microsoft.public.development.device.drivers
\par
\par This are the strings we send on PnP over the USB.
\par
\par
\par
\par Device string sent for Manufacturer "Manufacturer AB" (in UNICODE)
\par Device string sent for Model "My Printer" (in UNICODE)
\par Printer Class command GET_DEVICE_ID "MANUFACTURER:Manufacturer AB;COMMAND
\par SET:None;MODEL:My Printer;CLASS:PRINTER;DESCRIPTION:USB Ticket Printer My
\par Printer;" (IEEE 1284 PnP)
\par
\par
\par
\par My question is:
\par
\par From what strings are the Registry keys generated? Both manufacturer and
\par product/model can be read

RE: USB PnP recognition and registry keys

Postby martinbo » Fri, 02 Jul 2004 06:16:48 GMT

Manfred,

The string you are seeing on the balloon must be coming from the 1284 
strings.  USBPRINT.SYS will return the Device ID string created for the 
printer as a device description, which is simply the manufacturer and model 
strings concatenated together.  I think your best option here is to simply 
add a space on to the end of the manufacturer string so there is a space 
between it and the model name.

Thanks,
Martin Borve [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Manfred,
\par 
\par The string you are seeing on the balloon must be coming from the 1284 strings.  USBPRINT.SYS will return the Device ID string created for the printer as a device description, which is simply the manufacturer and model strings concatenated together.  I think your best option here is to simply add a space on to the end of the manufacturer string so there is a space between it and the model name.
\par 
\par Thanks,
\par Martin Borve [MSFT]
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par 
\par }

Re: USB PnP recognition and registry keys

Postby Max Kielland » Wed, 07 Jul 2004 17:32:57 GMT

I guess you refer to the USB Device strings, right?
So the INF file is using the PnP string, because it might be tricky to start
or end with an space in the INF file.

// Max







model
rights.



Similar Threads:

1.Programmatically setting a registry key in "other driver's" hardware key

2.parallel port reinitializing resources (was: Programmatically setting a registry key in "other driver's" hardware key)

3.How can I delete the registry key of device from registry on Vista

When you install the new driver, you can find the devnodes for nonpresent 
devices and do an update driver ont them.You don't have delete or uninstall 
devices. The src\general\toaster\toastpkg demonstrates how to do this. 
Please follow that.

-Eliyas

"Marvin_Taiwan" < XXXX@XXXXX.COM > wrote in message 
news: XXXX@XXXXX.COM ...
> Scenario:I had a PC with two or more USB port , and I try to use a
> installation applicaion to install a driver for my USB device ,but the USB
> device had been plug-in to the USB port 1 and was not attached to the PC 
> when
> I run the installation application, and  my USB device can install the
> correct driver if my USB device attache to the USB port 2 which my USB 
> device
> never been attached on, but if my USB device attach to the original USB 
> port
> 1, the driver will be as the older as the my USB device first plug-in.How 
> can
> I do to let my USB device can install the correct driver even thought the
> device attached to the USB port which it had been attached on before. The
> apporach I had think is to delete the registry key of my USB device from
> registry when the preinstallation is fail because the device is not 
> attached
> to the USB port when I run the installation application , but how can I do 
> to
> delete registy on Vista? 


4.How can I delete the registry key of device from registry on V

Thanks PA,

I know I can force reinstall of all instances , but how can I make the the 
no-present device which ever plug-in to our system to reinstall the new 
driver.For example, when a HID device had been pluged-in to my USB port 1 in 
my PC at first time and the driver will be installed by Windows default and 
work fine,and then the HID device unattached from my pc, and at that time , 
user run the isntallation package to install the driver to my PC, and then 
the setup API will find the HID device is not present on my pc ,and will do 
some sutible process like copy the inf file and driver package and cat file 
to sutible folder, after that , the user maybe attach the HID device to USB 
port 2 in my PC , that will be Ok for the HID device to install the new 
driver , but if the user attach the HID device to USB port 1 again, the 
driver will not be re-installed again , it means the driver will be as old as 
the Windows default. That is my problem , how can I do to make my HID device 
have the new driver installed always? 

"Pavel A." wrote:

> "Marvin_Taiwan" wrote:
> > Scenario:I had a PC with two or more USB port , and I try to use a 
> > installation applicaion to install a driver for my USB device ,but the USB 
> > device had been plug-in to the USB port 1 and was not attached to the PC when 
> > I run the installation application, and  my USB device can install the 
> > correct driver if my USB device attache to the USB port 2 which my USB device 
> > never been attached on, but if my USB device attach to the original USB port 
> > 1, the driver will be as the older as the my USB device first plug-in.How can 
> > I do to let my USB device can install the correct driver even thought the 
> > device attached to the USB port which it had been attached on before. The 
> > apporach I had think is to delete the registry key of my USB device from 
> > registry when the preinstallation is fail because the device is not attached 
> > to the USB port when I run the installation application , but how can I do to 
> > delete registy on Vista?
> 
> No this is a wrong approach. A better approach is to 
> force reinstall of all instances of your device. Don't delete any keys.
> For details, read sources of the devcon utility and WDK documentation. 
> 
> Regards,
> --PA
> 

5.Deleting USB Hardware Keys From The Registry

I want to remove all traces of a USB device from the registry so XP
prompts for a driver next time I connect. If I just delete the delete
only the hardware key, e.g.


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_xxxx&Pid_xxxx

...when I reconnect the device it is identified and reinstalled OK.

I presume this is because it still has a driver key node under the
class key, e.g.


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0031
	
As this contains the name of the INF file the system is happy to
install it. (I haven't actually deleted any driver files yet).


Since the driver keys under a class key are numnbered sequentially
(0000 0001 0002 etc), is it safe to just delete the relevant key for
the driver I want to "unregister", or is there a safe way of doing
this using the API that wont leave a hole in the numbering sequence.

Thanks.

6. Vista delete USB registry keys

7. Knowing a specific registry key before plugging a USB device

8. USB registry key: LoadClients vs. ClientDrivers



Return to device driver

 

Who is online

Users browsing this forum: No registered users and 74 guest