- Link between setup classes and interface classes.
- Posted by Guillaume on April 22nd, 2005
Dear All,
I would like to communicate directly with USB and parallel local
printers using CreateFile, WriteFile and ReadFile functions from the
Windows API.
To retrieve local printers connected to a PC, I used the setupapi with
the printer setup class as follow :
SetupDiGetClassDevs(&GUID_DEVCLASS_PRINTER, 0, 0, DIGCF_PRESENT);
Then I could enumerate the printers using SetupDiEnumDeviceInfo ().
To communicate with the printers using CreateFile, WriteFile and
ReadFile functions, I figured out I had to retrieve the "symbolic name"
of the printers using SetupDiGetDeviceInterfaceDetail ().
How can I get the device interfaces of the printers I retrieved using
SetupDiEnumDeviceInfo () ? What is the link between setup class and
interface class ?
Best regards,
Guillaume.
- Posted by Maxim S. Shatskih on April 22nd, 2005
I'm not sure this is possible for USB printers. The kernel mode driver for
USB printer can assume that its only user-mode client is USBMON.DLL, which can
have some set of undocumented IOCTLs to communicate to the kernel mode part.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Guillaume" <guillaume.gerard@gmail.com> wrote in message
news:1114156672.040596.240050@l41g2000cwc.googlegr oups.com...
- Posted by Guillaume on April 27th, 2005
Thanks a lot for your help!
I managed to retrieve the symbolic name of a specific printer. (The
link is the device id.)
I then used CreateFile to open the USB printer.
I tested this method with 2 printers: Lexmark E321 and HP Laserjet 1320
PCL 6.
It works well with the USB Lexmark E321 printer but CreateFile fails
with the HP Laserjet 1320 PCL 6. (Error code ERROR_GEN_FAILURE "A
device attached to the system is not functioning.").
What is that error from?
Is that possible that, for some reasons, the device be locked?
- After Effects and Final Cut Pro classes (Desktops) by aq_alidost1@yahoo.com
- Adding external classes (Programming) by Lilith
- Re: Server-side installation as it relates to custom setup classes (Drivers) by Eliyas Yakub [MSFT]
- Device interface classes (Drivers) by MichaelC
- Device Interface Classes (Drivers) by Gerhard Steup

