BIDI_START_PASSTHRU(1Ah) starts a passthru reading session. An application or printer driver that needs to issue a passthru query to the printer, and get its response, must establish a temporary passthru session.

There can be only one passthru session active for a printer port. A passthru session is necessary in order to use the BIDI_READ_PASSTHRU(8001h) command structure. The passthru session receives all data returned by the printer via BIDI_READ_PASSTHRU(8001h). After the application has received its answer(s), it must use BIDI_END_PASSTHRU(1Bh) to allow other applications or printer drivers to get a passthru session.

Giving a remote control panel display to the user is an example of using a passthru session. The printer driver uses BIDI_START_PASSTHRU, then sends any printer-specific commands using BIDI_SEND_PASSTHRU(1h). Next, the printer driver waits for the printer responses using BIDI_READ_PASSTHRU(8001h) and, finally, after the query is satisfied, the printer driver must use BIDI_END_PASSTHRU(1Bh).

Passthru sessions must be responsive. The protocol converter will store only the last five (5) printer messages if a passthru session is active. If a passthru session is not active for more than three (3) minutes, the session can be terminated.


[Back: Remarks]
[Next: Parameters]