An entry is created in the registry under the key
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\USB\Vid_0000&Pid_0000" (I
assume the vendor and product ID are 0000 because it is an unknown device).
I have previously successfully written data directly to a USB printer that
DOES install a driver, using a C++ program and invoking the "CreateFile"
function (specifiying the port as the vendor and product id name from the
registry subkey "..\Device Parameters\SymbolicName"). Even though a driver
is installed, the registry entries show it using USBPRINT.
After this long explanantion my question is, how can I write to the USB
printer that does not come with a Windows driver? Should I just be able to
use its 0000 vendor and product id as the port descriptor because it is also
using USBPRINT, or do I need to bugger about and create some sort of ini
file so that Windows recognises it properly? Or do I need a generic Windows
driver for it first?
Regards
Gary Styles
Here are the short answers:
> ... how can I write to the USB printer that does not come with a Windows
driver?
Write a printer driver for it and talk to the driver.
> Should I just be able to use its 0000 vendor and product id as the port
descriptor
> because it is also using USBPRINT, ...
No.
> ... or do I need to bugger about and create some sort of ini
> file so that Windows recognises it properly?
You probably mean INF file, but that requires that windows have a high level
printer
driver to load.
> Or do I need a generic Windows driver for it first?
You need a driver that knows about the specific printer in question, i.e. a
vendor driver or your own if you know the details about how to talk to the
specific printer.
Here's the long answer from the DDK:
USBPRINT.SYS is the Microsoft®-provided kernel-mode device driver for USB
printers. USBPRINT.SYS works with USBMON.DLL to provide end-to-end
connectivity between USB printers and high-level printer drivers.
Unlike some USB device classes, USBPRINT.SYS does not "drive" the printer.
Instead, USBPRINT simply provides a communication conduit by which
higher-level drivers can control the printer. As with Parallel, every USB
printer will require a printer driver to render print jobs, and may also
require a language monitor to manage high-level communication with the
printer.
Marc Reinig
System Solutions
"Mr G" <gst...@nexxussoft.com> wrote in message
news:9def9f$jss$1...@sshuraaa-i-1.production.compuserve.com...
Looks like I've gotta lotta work ahead of me!!
Regards
Gazry Styles