SplQmOpen: Difference between revisions
Created page with "SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler. ==Syntax== rc = SplQpOpen(cData, pbData); ==Parameters== ; cData (L..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler. | SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler. | ||
==Syntax== | ==Syntax== | ||
rc = SplQpOpen(cData, pbData) | rc = SplQpOpen(cData, pbData) | ||
==Parameters== | ==Parameters== | ||
; cData (LONG) - input | ; cData (LONG) - input: The number of elements in the SQPOPENDATA structure. | ||
: The number of elements in the SQPOPENDATA structure. | ; pbData (PSQPOPENDATA) - input: Pointer to the SQPOPENDATA structure. | ||
; pbData (PSQPOPENDATA) - input | |||
: Pointer to the SQPOPENDATA structure. | |||
This structure is based on the DEVOPENSTRUC data structure and would typically contain data extracted from the presentation driver's physical device block. | |||
:pszLogAddress Pointer to the output port name. Can also be a filename. | |||
:pszDriverName Pointer to presentation driver name. | |||
:pdriv Pointer to a DRIVDATA structure: | |||
::cb Size, in bytes, of this structure. | |||
::lVersion Version number of the data. Version numbers are defined by the presentation driver. | |||
::szDeviceName[32] String identifying the device. Valid values are supplied by the presentation driver. | |||
::abGeneralData General data, the type of which is defined by the presentation driver. | |||
:pszDataType Pointer to the data type of the queued file. All queue drivers must support PM_Q_STD and PM_Q_RAW. User-defined data types are optional. | |||
:pszComment Pointer to a description of the application that submitted the print job. | |||
:pszProcParams Pointer to a string of blank-separated queue driver parameters. | |||
; Note: All queue drivers must support the "COP=n" parameter, where n is the number of copies of the job to print. | |||
:pszSpoolParams Pointer to a string of spooler parameters separated by one or more blanks. Valid parameters are: | |||
FORM=aaa Identifies the form name for the print job. Multiple names should be separated by commas (aaa,bbb,ccc). If this parameter is not present, the job is printed on the current form. | |||
Form names are defined by the presentation driver. Valid names are those that would be returned from a call to the driver's GreQueryHardcopyCaps handling routine. | |||
PRTY=n Identifies the priority for the print job. The priority can be any value from 1 through 99 (1 is lowest priority). Notice that this parameter has no significance when passed to SplQpOpen. | |||
pszDocName Pointer to a string containing the document name. | :pszNetworkParams Pointer to string of networking parameters. These are only used in a network environment; their nature is defined by the network application. Typically, the queue driver ignores this parameter. | ||
:pszDocName Pointer to a string containing the document name. | |||
pszQueueName Pointer to a string containing the name of the queue from which the job was sent by the spooler. | :pszQueueName Pointer to a string containing the name of the queue from which the job was sent by the spooler. | ||
:pszToken Pointer to the device information token. This currently is not used by queue drivers, and is typically '*' (asterisk). | |||
pszToken Pointer to the device information token. This currently is not used by queue drivers, and is typically ' * ' (asterisk). | :idJobId This is a USHORT value that identifies the print job. | ||
idJobId This is a USHORT value that identifies the print job. | |||
==Return Code== | ==Return Code== | ||
; rc (HPROC) - returns | ; rc (HPROC) - returns: Return codes. | ||
: Return codes. | |||
On completion, the handling routine must return: | On completion, the handling routine must return: | ||
SPL_ERROR Error | SPL_ERROR Error | ||
¬=0 Queue driver (queue processor) handle | ¬=0 Queue driver (queue processor) handle | ||
==Remarks== | ==Remarks== | ||
The information passed into this API will be used by SplQpPrint to format the spool file. | The information passed into this API will be used by SplQpPrint to format the spool file. | ||
==Example Code== | ==Example Code== |
Latest revision as of 20:21, 2 July 2023
SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler.
Syntax
rc = SplQpOpen(cData, pbData)
Parameters
- cData (LONG) - input
- The number of elements in the SQPOPENDATA structure.
- pbData (PSQPOPENDATA) - input
- Pointer to the SQPOPENDATA structure.
This structure is based on the DEVOPENSTRUC data structure and would typically contain data extracted from the presentation driver's physical device block.
- pszLogAddress Pointer to the output port name. Can also be a filename.
- pszDriverName Pointer to presentation driver name.
- pdriv Pointer to a DRIVDATA structure:
- cb Size, in bytes, of this structure.
- lVersion Version number of the data. Version numbers are defined by the presentation driver.
- szDeviceName[32] String identifying the device. Valid values are supplied by the presentation driver.
- abGeneralData General data, the type of which is defined by the presentation driver.
- pszDataType Pointer to the data type of the queued file. All queue drivers must support PM_Q_STD and PM_Q_RAW. User-defined data types are optional.
- pszComment Pointer to a description of the application that submitted the print job.
- pszProcParams Pointer to a string of blank-separated queue driver parameters.
- Note
- All queue drivers must support the "COP=n" parameter, where n is the number of copies of the job to print.
- pszSpoolParams Pointer to a string of spooler parameters separated by one or more blanks. Valid parameters are:
FORM=aaa Identifies the form name for the print job. Multiple names should be separated by commas (aaa,bbb,ccc). If this parameter is not present, the job is printed on the current form.
Form names are defined by the presentation driver. Valid names are those that would be returned from a call to the driver's GreQueryHardcopyCaps handling routine.
PRTY=n Identifies the priority for the print job. The priority can be any value from 1 through 99 (1 is lowest priority). Notice that this parameter has no significance when passed to SplQpOpen.
- pszNetworkParams Pointer to string of networking parameters. These are only used in a network environment; their nature is defined by the network application. Typically, the queue driver ignores this parameter.
- pszDocName Pointer to a string containing the document name.
- pszQueueName Pointer to a string containing the name of the queue from which the job was sent by the spooler.
- pszToken Pointer to the device information token. This currently is not used by queue drivers, and is typically '*' (asterisk).
- idJobId This is a USHORT value that identifies the print job.
Return Code
- rc (HPROC) - returns
- Return codes.
On completion, the handling routine must return:
SPL_ERROR Error
¬=0 Queue driver (queue processor) handle
Remarks
The information passed into this API will be used by SplQpPrint to format the spool file.
Example Code
#include <os2.h> LONG cData; /* The number of elements in the SQPOPENDATA structure. */ PSQPOPENDATA pbData; /* Pointer to the SQPOPENDATA structure. */ HPROC rc; /* Return codes. */ rc = SplQpOpen(cData, pbData);