Flags
defining how to send the data to the printer.
All other bits must be clear. Values are as follows:
FLG_MUSTCOMPLETE - 0x00000001
If set, the caller
does not want to return until the command sequence is sent to the printer.
If this flag is not set, the caller returns immediately if unable
to send the command. For example, the command might not be sent if the printer
is being sent a job and the printer cannot accept commands inside a job
boundary.
FLG_SYNCH - 0x00000002
If
set, waits for any current job to finish being sent to the printer before
sending this command sequence.
FLG_MORECMDS - 0x00000004
If set, more SplPdSendCmd calls are necessary to
complete the current query or set command.
FLG_DATACHANNEL
- 0x00000008
If set, the data channel should be
used for this command.
The data channel is the channel into the printer on which print job data
is sent. Some printers also support a command channel, such as SNMP, which
can be used to send commands into the printer.
However, some commands must be sent to the printer using the data channel
instead of the command channel (for example, sending a PJL query requires
sending the PJL command via the data channel.)
FLG_SNMPCHANNEL
- 0x00000010
If set, the SNMP channel should be
used for this command.
If this flag is set and there is no SNMP channel available, ERROR_INVALID_PATH(253)
is returned.
FLG_RESERVEDCHANNEL - 0x00000020
This
bit may be used to access a special channel in the port driver. If this
flag is set and the port driver does not support a special channel, the
default command channel should be used to send this data to the printer.
ulCommand (ULONG) - input
Generic
command code.
This code is given to the port driver for information only. The pInData
parameter contains the BIDI software protocol-specific packet to send
to the printer.
Current commands are as follows:
BIDI_Q_SW(800Ch)
Query BIDI software capabilities.
BIDI_Q_DEVICE(800Dh)
Query
printer device characteristics.
BIDI_Q_INTERPRETER(800Eh)
Query interpreters available in the printer.
BIDI_Q_INPUTBINS(800Fh)
BIDI_Q_OUTPUTBINS(8010h)
BIDI_Q_FONTS(8012h)
Query fonts for a particular interpreter.
BIDI_Q_JOBS_COMPLETE(8013h)
Query list of completed jobs.
BIDI_Q_JOBS_QUEUED(8014h)
Query list of queued jobs.
BIDI_Q_STATUS(8015h)
Query current status of the print device.
BIDI_Q_STORAGE(8023h)
Return printer storage media.
pInData (PVOID) - input
cbInData (ULONG) - input
Length
of command sequence in pInData, in bytes.
rc (ULONG) - returns
Return
codes.
- Success
- ERROR_FILE_NOT_FOUND)
The pszPortName
given is not a valid port name configured for this port driver.
5(ERROR_ACCESS_DENIED)
Not authorized to access printer port.
8(ERROR_NOT_ENOUGH_MEMORY)
Not enough memory to satisfy request.
29(ERROR_WRITE_FAULT)
Failure attempting to write to the device. The
printer might not have received the command sequence.
87(ERROR_INVALID_PARAMETER)
An invalid buffer was given.
253(ERROR_INVALID_PATH)
Invalid channel requested.
683(ERROR_BIDI_NO_SUPPORT)
The printer is not in bidirectional mode, therefore
query requests are not honored. The port also may be in the process of being
shut down.
0x4013(PMERR_SPL_JOB_PRINTING)
A job is being sent to the printer, the printer
cannot accept commands while receiving job data, and FLG_MUSTCOMPLETE is
clear.
0x403D(PMERR_SPL_CNV_NOT_INIT)
The
protocol converter or port driver has not been initialized for this port.
[Back: SplPdSendCmd Return Value - rc]
[Next: SplPdSendCmd - Remarks]