J
Jeremy Zhu
Guest
Hi everyone,
I developed a desktop application to read information and send data from/to a printer device.
The steps is:
1. Use SetupDiGetDeviceInterfaceDetail to get the path of the printer.
2. Use createfile to get the handler of the printer with read&write permission.
3. Call writefile API to send data to the printer, and the embedded program of the printer can receive the data.
4. Call readfile API to read the return value of the printer with the same handler as step3, but the API returns error. (The errorcode from GetLastError is 6)
Could someone please tell me what is the reason of the error? Maybe some suggestion can also do me a favor.
How to make USB printer support to get return value from it with readfile API?
Thank you very much!
Continue reading...
I developed a desktop application to read information and send data from/to a printer device.
The steps is:
1. Use SetupDiGetDeviceInterfaceDetail to get the path of the printer.
2. Use createfile to get the handler of the printer with read&write permission.
3. Call writefile API to send data to the printer, and the embedded program of the printer can receive the data.
4. Call readfile API to read the return value of the printer with the same handler as step3, but the API returns error. (The errorcode from GetLastError is 6)
Could someone please tell me what is the reason of the error? Maybe some suggestion can also do me a favor.
How to make USB printer support to get return value from it with readfile API?
Thank you very much!
Continue reading...