Jump to content

Command values: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==BIDI_SEND_PASSTHRU==
==BIDI_ADD_VIRTUAL_PORT==
BIDI_SEND_PASSTHRU(1h) is a protocol-specific command that can be issued to the printer. This command does not return any response data to the caller. BIDI_SEND_PASSTHRU(1h) can be sent at any time, not just during a passthru session. See BIDI_START_PASSTHRU(1Ah) for more details.
BIDI_ADD_VIRTUAL_PORT(26h) adds a virtual printer port. This command is sent to the port driver to notify it that a port for querying purposes only has been added. The port driver does not know about the printer port passed into SplPdSet when BIDI_ADD_VIRTUAL_PORT(26h) is sent.
 
==BIDI_CANCELJOB==
BIDI_CANCELJOB(6h) cancels a job in the printer.
 
For all PRT_xx_JOB commands, if the caller does not know the printer job ID, the caller can set both InterpreterID and ulPrinterJobID to -1 and pass in the spooler job ID. The spooler will set the printer job ID based on information stored about the spooler job ID.
 
==BIDI_DEL_PORT==
BIDI_DEL_PORT(28h) is sent to the protocol converter and the port driver after a spooler port has been removed, even if the port driver is the application removing the port. It is not sent when a virtual port is removed. The protocol converter and port driver can free any instance data stored for the printer port.
 
'''Note:''' Port drivers are normally called to remove a port by the print object, but any application can remove a port by updating the system .INI file.
 
==BIDI_DEL_VIRTUAL_PORT==
BIDI_DEL_VIRTUAL_PORT(27h) deletes a virtual printer port. This command is sent to the port driver when an application calls SplDeletePort to remove a virtual port.
 
==BIDI_DISABLE_ALERT==
BIDI_DISABLE_ALERT(25h) disables alerts for the printer. This command is sent as a result of an application calling SplUnRegister to unregister for alerts. Only the alert(s) specified are disabled.


==BIDI_STARTJOB==
==BIDI_ENABLE_ALERT==
BIDI_STARTJOB(2h) is called by the port driver during SplPdOpen to signal the protocol converter that the print job is starting. The port driver should use the pPrtOpenStruct parameter in SplPdOpen to derive the parameters for this command.
BIDI_ENABLE_ALERT(24h) enables alerts for the printer. This command is sent as a result of an application calling SplRegister to register for alerts. The alert(s) specified are enabled, in addition to any currently enabled alerts for the printer.


'''Note:''' The caller of PrtSet can set the following parameters in the PRTSTARTJOB data structure:
==BIDI_END_PASSTHRU==
* ulSpoolerJobID - set to -1
BIDI_END_PASSTHRU(1Bh) terminates a passthru reading session. This command releases the port's passthru session and allows another application to start a temporary passthru session.
* ulInterpreterID - set to -1
This will let the spooler fill in the values based on the current job being sent to this printer port.


==BIDI_ENDJOB==
==BIDI_ENDJOB==
Line 18: Line 32:
This will let the spooler fill in the values based on the current job being sent to this printer port.
This will let the spooler fill in the values based on the current job being sent to this printer port.


==BIDI_HOLDJOB==
BIDI_HOLDJOB(4h) holds a job in the printer.
BIDI_HOLDJOB(4h) holds a job in the printer.


BIDI_RELEASEJOB(5h) releases a job held in the printer.
==BIDI_INIT==
 
BIDI_INIT(Bh) sets the printer to BIDI mode and changes the printer from unidirectional to bidirectional. BIDI_INIT is called after a BIDI_TERM call to restart bidirectional printing.
BIDI_CANCELJOB(6h) cancels a job in the printer.
 
For all PRT_xx_JOB commands, if the caller does not know the printer job ID, the caller can set both InterpreterID and ulPrinterJobID to -1 and pass in the spooler job ID. The spooler will set the printer job ID based on information stored about the spooler job ID.


==BIDI_INIT_PORTDRV==
BIDI_INIT_PORTDRV(8h) initializes a port driver. This command is sent during spooler initialization and when a port driver is first installed. BIDI_INIT_PORTDRV(8h) is called only once per port driver. No other commands are sent to the port driver until this command completes. As a result, a port driver that opens network adapters has the opportunity to do so while processing the BIDI_INIT_PORTDRV(8h) command.
BIDI_INIT_PORTDRV(8h) initializes a port driver. This command is sent during spooler initialization and when a port driver is first installed. BIDI_INIT_PORTDRV(8h) is called only once per port driver. No other commands are sent to the port driver until this command completes. As a result, a port driver that opens network adapters has the opportunity to do so while processing the BIDI_INIT_PORTDRV(8h) command.


Line 32: Line 45:
'''Note:''' If the port driver returns an error, the spooler may unload the port driver. No jobs will be sent to this port driver until the BIDI_INIT_PORTDRV(8h) command succeeds.
'''Note:''' If the port driver returns an error, the spooler may unload the port driver. No jobs will be sent to this port driver until the BIDI_INIT_PORTDRV(8h) command succeeds.


BIDI_RESET(9h) resets the printer. This command resets the printer to the state defined in ulResetValue. If the printer is connected using a network card, the network card is not reset.
==BIDI_INIT_PROTCNV==
BIDI_INIT_PROTCNV(Fh) initializes the protocol converter for a port. The spooler passes the BIDI_Q_PORT command structure, returned by the port driver, to the protocol converter using BIDI_INIT_PROTCNV(Fh). The protocol converter should initialize its cache for the given port name.
 
'''Note:''' If a protocol converter or extension is unable to support the printer, it should return ERROR_NOT_SUPPORTED for BIDI_INIT_PROTCNV(Fh).
 
==BIDI_NOTIFY_ENDJOBCONNECT==
BIDI_NOTIFY_ENDJOBCONNECT(20h) notifies the port driver that a job connection is not needed. The spooler sends this command to notify the port driver that no jobs are waiting for confirmation from the printer.
 
BIDI_NOTIFY_ENDJOBCONNECT(20h) allows the port driver to know when the spooler is not currently using the printer for print jobs. It does not imply that the spooler will not use the printer again in the near future.


BIDI_SHUTDOWN(Ah) releases all threads waiting for this protocol converter and port driver. This command is used to shut down the protocol converter and port driver when disabling the spooler. The command is sent first to the protocol converter to shut down the port; then the port driver is called.
==BIDI_NOTIFY_PORT_RELEASED==
BIDI_NOTIFY_PORT_RELEASED(22h) notifies the port driver that the port is no longer selected in a print object. The spooler sends this command to notify the port driver that the output port is no longer connected to a print queue. BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler will not be sending print jobs to this printer.


BIDI_INIT(Bh) sets the printer to BIDI mode and changes the printer from unidirectional to bidirectional. BIDI_INIT is called after a BIDI_TERM call to restart bidirectional printing.
The port driver should not assume that no job can be sent to this port, because an application can still print OD_DIRECT to this port. BIDI_NOTIFY_PORT_RELEASED(22h) can assist the port driver in determining the type of connection necessary for the printer.


BIDI_TERM(Ch) sets the printer to unidrectional mode. This tells the port driver and kernel device driver the port is set to unidirectional mode.
==BIDI_NOTIFY_PORT_SELECTED==
BIDI_NOTIFY_PORT_SELECTED(21h) notifies the port driver that the port is selected in a print object. The spooler sends this command to notify the port driver that the output port is selected by a print queue.


BIDI_RESPONSE_FMT(Dh) sets the format of the printer-to-host messages. The spooler queries the protocol converter with BIDI_Q_RESPONSE_FMT(8018h). The spooler then passes this information to the port driver, using BIDI_RESPONSE_FMT. This allows the port driver to determine printer response message boundaries.
BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler has a print queue connected to this printer and that jobs may be submitted to this printer. This command can assist the port driver in determining the type of connection necessary for the printer.


==BIDI_PACKET_SIZE==
BIDI_PACKET_SIZE(Eh) defines the printer-to-host maximum packet size.
BIDI_PACKET_SIZE(Eh) defines the printer-to-host maximum packet size.


BIDI_SET_PORTDRV(19h) stores port driver configuration data. A port driver on a client implements SplPdRemoteSetPort by calling PrtQuery(BIDI_Q_PORTDRV(8019h)). This call gets the port driver configuration from the server. Next, the port driver displays the port configuration and, if the user changes anything, updates the server's port driver settings using PrtSet(BIDI_SET_PORTDRV).
==BIDI_Q_CONVERTER_INFO==
BIDI_Q_CONVERTER_INFO(8021h) gets protocol converter information.


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.
This function returns information about the protocol converter currently active for the printer. If an extension protocol converter is being used, the extension should call the base converter to get the information about the base converter. The extension converter should then copy the base converter version and strings into the caller's buffer, along with the extension's information.


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.
==BIDI_Q_DEVICE==
BIDI_Q_DEVICE(800Dh) queries the printer device characteristics. This function returns the capabilities and characteristics of the printer.


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).
==BIDI_Q_FONTS==
BIDI_Q_FONTS(8012h) queries fonts for a particular


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.
==BIDI_Q_INPUTBINS==
BIDI_Q_INPUTBINS(800Fh) queries input bins.


BIDI_END_PASSTHRU(1Bh) terminates a passthru reading session. This command releases the port's passthru session and allows another application to start a temporary passthru session.
==BIDI_Q_INTERPRETER==
BIDI_Q_INTERPRETER(800Eh) returns information on interpreters that are available in the printer.


BIDI_NOTIFY_ENDJOBCONNECT(20h) notifies the port driver that a job connection is not needed. The spooler sends this command to notify the port driver that no jobs are waiting for confirmation from the printer.
==BIDI_Q_STORAGE==
BIDI_Q_STORAGE(8023h) returns printer storage media information.


BIDI_NOTIFY_ENDJOBCONNECT(20h) allows the port driver to know when the spooler is not currently using the printer for print jobs. It does not imply that the spooler will not use the printer again in the near future.
==BIDI_RELEASEJOB==
BIDI_RELEASEJOB(5h) releases a job held in the printer.


BIDI_NOTIFY_PORT_SELECTED(21h) notifies the port driver that the port is selected in a print object. The spooler sends this command to notify the port driver that the output port is selected by a print queue.
==BIDI_RESET==
BIDI_RESET(9h) resets the printer. This command resets the printer to the state defined in ulResetValue. If the printer is connected using a network card, the network card is not reset.


BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler has a print queue connected to this printer and that jobs may be submitted to this printer. This command can assist the port driver in determining the type of connection necessary for the printer.
==BIDI_RESPONSE_FMT==
BIDI_RESPONSE_FMT(Dh) sets the format of the printer-to-host messages. The spooler queries the protocol converter with BIDI_Q_RESPONSE_FMT(8018h). The spooler then passes this information to the port driver, using BIDI_RESPONSE_FMT. This allows the port driver to determine printer response message boundaries.


BIDI_NOTIFY_PORT_RELEASED(22h) notifies the port driver that the port is no longer selected in a print object. The spooler sends this command to notify the port driver that the output port is no longer connected to a print queue. BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler will not be sending print jobs to this printer.
==BIDI_SEND_PASSTHRU==
 
BIDI_SEND_PASSTHRU(1h) is a protocol-specific command that can be issued to the printer. This command does not return any response data to the caller. BIDI_SEND_PASSTHRU(1h) can be sent at any time, not just during a passthru session. See BIDI_START_PASSTHRU(1Ah) for more details.
The port driver should not assume that no job can be sent to this port, because an application can still print OD_DIRECT to this port. BIDI_NOTIFY_PORT_RELEASED(22h) can assist the port driver in determining the type of connection necessary for the printer.


==BIDI_SET_DEVICE_ID==
BIDI_SET_DEVICE_ID(23h) sets the printer's device ID. The protocol converter calls PrtSet with this command structure to notify the spooler of the device ID of an attached printer.
BIDI_SET_DEVICE_ID(23h) sets the printer's device ID. The protocol converter calls PrtSet with this command structure to notify the spooler of the device ID of an attached printer.


BIDI_SET_DEVICE_ID(23h) is used when the port driver is unable to determine the device ID during [[BIDI_Q_PORT(800Bh)]], and allows the protocol converter to retrieve the device ID.
BIDI_SET_DEVICE_ID(23h) is used when the port driver is unable to determine the device ID during [[BIDI_Q_PORT(800Bh)]], and allows the protocol converter to retrieve the device ID.


BIDI_ENABLE_ALERT(24h) enables alerts for the printer. This command is sent as a result of an application calling SplRegister to register for alerts. The alert(s) specified are enabled, in addition to any currently enabled alerts for the printer.
==BIDI_STARTJOB==
BIDI_STARTJOB(2h) is called by the port driver during SplPdOpen to signal the protocol converter that the print job is starting. The port driver should use the pPrtOpenStruct parameter in SplPdOpen to derive the parameters for this command.
 
'''Note:''' The caller of PrtSet can set the following parameters in the PRTSTARTJOB data structure:
* ulSpoolerJobID - set to -1
* ulInterpreterID - set to -1
This will let the spooler fill in the values based on the current job being sent to this printer port.
 
==BIDI_SHUTDOWN==
BIDI_SHUTDOWN(Ah) releases all threads waiting for this protocol converter and port driver. This command is used to shut down the protocol converter and port driver when disabling the spooler. The command is sent first to the protocol converter to shut down the port; then the port driver is called.
 
==BIDI_TERM==
BIDI_TERM(Ch) sets the printer to unidirectional mode. This tells the port driver and kernel device driver the port is set to unidirectional mode.


BIDI_DISABLE_ALERT(25h) disables alerts for the printer. This command is sent as a result of an application calling SplUnRegister to unregister for alerts. Only the alert(s) specified are disabled.
==BIDI_SET_PORTDRV==
BIDI_SET_PORTDRV(19h) stores port driver configuration data. A port driver on a client implements SplPdRemoteSetPort by calling PrtQuery(BIDI_Q_PORTDRV(8019h)). This call gets the port driver configuration from the server. Next, the port driver displays the port configuration and, if the user changes anything, updates the server's port driver settings using PrtSet(BIDI_SET_PORTDRV).


BIDI_ADD_VIRTUAL_PORT(26h) adds a virtual printer port. This command is sent to the port driver to notify it that a port for querying purposes only has been added. The port driver does not know about the printer port passed into SplPdSet when BIDI_ADD_VIRTUAL_PORT(26h) is sent.
==BIDI_START_PASSTHRU==
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.


BIDI_DEL_VIRTUAL_PORT(27h) deletes a virtual printer port. This command is sent to the port driver when an application calls SplDeletePort to remove a virtual port.
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.


BIDI_DEL_PORT(28h) is sent to the protocol converter and the port driver after a spooler port has been removed, even if the port driver is the application removing the port. It is not sent when a virtual port is removed. The protocol converter and port driver can free any instance data stored for the printer port.
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).


'''Note:''' Port drivers are normally called to remove a port by the print object, but any application can remove a port by updating the system .INI file.
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.

Revision as of 12:06, 5 February 2018

BIDI_ADD_VIRTUAL_PORT

BIDI_ADD_VIRTUAL_PORT(26h) adds a virtual printer port. This command is sent to the port driver to notify it that a port for querying purposes only has been added. The port driver does not know about the printer port passed into SplPdSet when BIDI_ADD_VIRTUAL_PORT(26h) is sent.

BIDI_CANCELJOB

BIDI_CANCELJOB(6h) cancels a job in the printer.

For all PRT_xx_JOB commands, if the caller does not know the printer job ID, the caller can set both InterpreterID and ulPrinterJobID to -1 and pass in the spooler job ID. The spooler will set the printer job ID based on information stored about the spooler job ID.

BIDI_DEL_PORT

BIDI_DEL_PORT(28h) is sent to the protocol converter and the port driver after a spooler port has been removed, even if the port driver is the application removing the port. It is not sent when a virtual port is removed. The protocol converter and port driver can free any instance data stored for the printer port.

Note: Port drivers are normally called to remove a port by the print object, but any application can remove a port by updating the system .INI file.

BIDI_DEL_VIRTUAL_PORT

BIDI_DEL_VIRTUAL_PORT(27h) deletes a virtual printer port. This command is sent to the port driver when an application calls SplDeletePort to remove a virtual port.

BIDI_DISABLE_ALERT

BIDI_DISABLE_ALERT(25h) disables alerts for the printer. This command is sent as a result of an application calling SplUnRegister to unregister for alerts. Only the alert(s) specified are disabled.

BIDI_ENABLE_ALERT

BIDI_ENABLE_ALERT(24h) enables alerts for the printer. This command is sent as a result of an application calling SplRegister to register for alerts. The alert(s) specified are enabled, in addition to any currently enabled alerts for the printer.

BIDI_END_PASSTHRU

BIDI_END_PASSTHRU(1Bh) terminates a passthru reading session. This command releases the port's passthru session and allows another application to start a temporary passthru session.

BIDI_ENDJOB

BIDI_ENDJOB(3h) is called by the port driver during SplPdClose to signal the end of the print job being sent to the printer.

Note: For this and all other BIDI_xx_JOB command structures, the caller of PrtSet can set the following parameters in the PRTJOB data structure:

  • ulInterpreterID - set to -1
  • ulPrinterJobID - set to -1

This will let the spooler fill in the values based on the current job being sent to this printer port.

BIDI_HOLDJOB

BIDI_HOLDJOB(4h) holds a job in the printer.

BIDI_INIT

BIDI_INIT(Bh) sets the printer to BIDI mode and changes the printer from unidirectional to bidirectional. BIDI_INIT is called after a BIDI_TERM call to restart bidirectional printing.

BIDI_INIT_PORTDRV

BIDI_INIT_PORTDRV(8h) initializes a port driver. This command is sent during spooler initialization and when a port driver is first installed. BIDI_INIT_PORTDRV(8h) is called only once per port driver. No other commands are sent to the port driver until this command completes. As a result, a port driver that opens network adapters has the opportunity to do so while processing the BIDI_INIT_PORTDRV(8h) command.

A port driver can spawn threads at this time, if another thread is needed in order to keep the printer connection active.

Note: If the port driver returns an error, the spooler may unload the port driver. No jobs will be sent to this port driver until the BIDI_INIT_PORTDRV(8h) command succeeds.

BIDI_INIT_PROTCNV

BIDI_INIT_PROTCNV(Fh) initializes the protocol converter for a port. The spooler passes the BIDI_Q_PORT command structure, returned by the port driver, to the protocol converter using BIDI_INIT_PROTCNV(Fh). The protocol converter should initialize its cache for the given port name.

Note: If a protocol converter or extension is unable to support the printer, it should return ERROR_NOT_SUPPORTED for BIDI_INIT_PROTCNV(Fh).

BIDI_NOTIFY_ENDJOBCONNECT

BIDI_NOTIFY_ENDJOBCONNECT(20h) notifies the port driver that a job connection is not needed. The spooler sends this command to notify the port driver that no jobs are waiting for confirmation from the printer.

BIDI_NOTIFY_ENDJOBCONNECT(20h) allows the port driver to know when the spooler is not currently using the printer for print jobs. It does not imply that the spooler will not use the printer again in the near future.

BIDI_NOTIFY_PORT_RELEASED

BIDI_NOTIFY_PORT_RELEASED(22h) notifies the port driver that the port is no longer selected in a print object. The spooler sends this command to notify the port driver that the output port is no longer connected to a print queue. BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler will not be sending print jobs to this printer.

The port driver should not assume that no job can be sent to this port, because an application can still print OD_DIRECT to this port. BIDI_NOTIFY_PORT_RELEASED(22h) can assist the port driver in determining the type of connection necessary for the printer.

BIDI_NOTIFY_PORT_SELECTED

BIDI_NOTIFY_PORT_SELECTED(21h) notifies the port driver that the port is selected in a print object. The spooler sends this command to notify the port driver that the output port is selected by a print queue.

BIDI_NOTIFY_PORT_SELECTED(21h) allows the port driver to know that the spooler has a print queue connected to this printer and that jobs may be submitted to this printer. This command can assist the port driver in determining the type of connection necessary for the printer.

BIDI_PACKET_SIZE

BIDI_PACKET_SIZE(Eh) defines the printer-to-host maximum packet size.

BIDI_Q_CONVERTER_INFO

BIDI_Q_CONVERTER_INFO(8021h) gets protocol converter information.

This function returns information about the protocol converter currently active for the printer. If an extension protocol converter is being used, the extension should call the base converter to get the information about the base converter. The extension converter should then copy the base converter version and strings into the caller's buffer, along with the extension's information.

BIDI_Q_DEVICE

BIDI_Q_DEVICE(800Dh) queries the printer device characteristics. This function returns the capabilities and characteristics of the printer.

BIDI_Q_FONTS

BIDI_Q_FONTS(8012h) queries fonts for a particular

BIDI_Q_INPUTBINS

BIDI_Q_INPUTBINS(800Fh) queries input bins.

BIDI_Q_INTERPRETER

BIDI_Q_INTERPRETER(800Eh) returns information on interpreters that are available in the printer.

BIDI_Q_STORAGE

BIDI_Q_STORAGE(8023h) returns printer storage media information.

BIDI_RELEASEJOB

BIDI_RELEASEJOB(5h) releases a job held in the printer.

BIDI_RESET

BIDI_RESET(9h) resets the printer. This command resets the printer to the state defined in ulResetValue. If the printer is connected using a network card, the network card is not reset.

BIDI_RESPONSE_FMT

BIDI_RESPONSE_FMT(Dh) sets the format of the printer-to-host messages. The spooler queries the protocol converter with BIDI_Q_RESPONSE_FMT(8018h). The spooler then passes this information to the port driver, using BIDI_RESPONSE_FMT. This allows the port driver to determine printer response message boundaries.

BIDI_SEND_PASSTHRU

BIDI_SEND_PASSTHRU(1h) is a protocol-specific command that can be issued to the printer. This command does not return any response data to the caller. BIDI_SEND_PASSTHRU(1h) can be sent at any time, not just during a passthru session. See BIDI_START_PASSTHRU(1Ah) for more details.

BIDI_SET_DEVICE_ID

BIDI_SET_DEVICE_ID(23h) sets the printer's device ID. The protocol converter calls PrtSet with this command structure to notify the spooler of the device ID of an attached printer.

BIDI_SET_DEVICE_ID(23h) is used when the port driver is unable to determine the device ID during BIDI_Q_PORT(800Bh), and allows the protocol converter to retrieve the device ID.

BIDI_STARTJOB

BIDI_STARTJOB(2h) is called by the port driver during SplPdOpen to signal the protocol converter that the print job is starting. The port driver should use the pPrtOpenStruct parameter in SplPdOpen to derive the parameters for this command.

Note: The caller of PrtSet can set the following parameters in the PRTSTARTJOB data structure:

  • ulSpoolerJobID - set to -1
  • ulInterpreterID - set to -1

This will let the spooler fill in the values based on the current job being sent to this printer port.

BIDI_SHUTDOWN

BIDI_SHUTDOWN(Ah) releases all threads waiting for this protocol converter and port driver. This command is used to shut down the protocol converter and port driver when disabling the spooler. The command is sent first to the protocol converter to shut down the port; then the port driver is called.

BIDI_TERM

BIDI_TERM(Ch) sets the printer to unidirectional mode. This tells the port driver and kernel device driver the port is set to unidirectional mode.

BIDI_SET_PORTDRV

BIDI_SET_PORTDRV(19h) stores port driver configuration data. A port driver on a client implements SplPdRemoteSetPort by calling PrtQuery(BIDI_Q_PORTDRV(8019h)). This call gets the port driver configuration from the server. Next, the port driver displays the port configuration and, if the user changes anything, updates the server's port driver settings using PrtSet(BIDI_SET_PORTDRV).

BIDI_START_PASSTHRU

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.