Author Topic: WinUsb_Initialize Fails  (Read 6451 times)


  • Member
  • ***
  • Posts: 1
WinUsb_Initialize Fails
« on: April 28, 2023, 03:58:49 am »
Good morning
I have a question to understand if ultimately it's really possible to do what I'm trying to do:
i have a brother pt900w printer from which i need to read 32 bytes back to which the printer writes its status.
We are able to send an ECP/P command to the printer via API "DllImport("winspool.Drv"..." to which it responds correctly and we are able to intercept the response via program (Usb Monitor Pro) (image 03_)  .
We fail to read through the same mechanism, so we are trying with "WinUsb_cs 3.1":
i found the "device interface Guid" and i can get the handle with "GetDeviceHandle" but "WinUsb_Initialize" fails the function (image 02_).

The question is:
can I read the data from the USB on a device that uses "usbprint.sys" (image 00_) ?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: WinUsb_Initialize Fails
« Reply #1 on: April 28, 2023, 10:00:16 am »
WinUSB is only for devices where the host has assigned the WinUSB driver, typically forvender-defined functions. It won't work on printers.

To implement a vendor-defined function for a printer, I believe you would need to provide a low level filter driver.