Timo
Timo

Reputation: 369

Reading data from USB Printer in C#

I have a CUSTOM PLUS II USB printer that I need to send and receive status information.

I am able to send commands to the printer using the WritePrinter method using winspool but can't read the response. I can't find a single working example of the ReadPrinter method.

This is the main example I have used for writing data: http://support.microsoft.com/kb/322091

I have tried to contact CUSTOM but get no response from them. Any other way to read from a USB printer would also be helpful.

Upvotes: 1

Views: 2956

Answers (2)

Hans Passant
Hans Passant

Reputation: 941218

It is called Bidi Communication. The SDK topic starts here. Beware for the rough ride, this is not friendly. Especially not in C#, these are COM interfaces without a type library.

Upvotes: 1

Ben Adams
Ben Adams

Reputation: 151

DataCard makes a c# wrapper for the IBidiSpl Interface, available in their SDK, which I found in SD260 printer support. The "Status" folder contains code to get bidirectional status data from a printer using the windows bidi API.

Upvotes: 0

Related Questions