Jump to content

SplQpOpen

From EDM2
Revision as of 21:12, 19 November 2019 by Martini (talk | contribs) (Created page with "SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler. ==Syntax== SplQpOpen(cData, pbData); ==Parameters== ; cData (LONG)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SplQpOpen opens the queue driver and returns its handle. This function is normally called by the spooler.

Syntax

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);