DEVESC_GETJOBID
Appearance
GreEscape DEVESC_GETJOBID (8160L) is called by an application to get the spooler job ID, print queue name, and print server name for the job the application is spooling.
This escape is not metafiled and is allowed only when printing OD_QUEUED.
- Simulation support
This function is optional for hardcopy drivers.
Syntax
GreEscape(lInCount, pbInData, plOutCount, pbOutData);
Parameters
- lInCount (LONG) - input
- Not used; must be set to 0 (zero).
- pbInData (PBYTE) - input
- Not used; must be set to NULL.
- plOutCount (PLONG) - output
- The number of bytes pointed to or used by pbOutData.
- There are two cases with this parameter.
- Case 1:
- INPUT: plOutCount points to a LONG (which holds the size needed) and pbOutData is NULL.
- OUTPUT: plOutCount contains the size needed.
- Case 2:
- INPUT: plOutCount points to a LONG (which has the size allocated) and pbOutData points to the block of memory.
- OUTPUT: pbOutData is filled in with the QMJOBINFO structure.
- pbOutData (PLONG) - output
- Buffer to receive QMJOBINFO data structure.
- See plOutCount for additional details.
Returns
- rc (LONG) - returns
- Return Code.
- 0: Successful completion.
- 6 (ERROR_INVALID_HANDLE): Invalid handle given.
- 87 (ERROR_INVALID_PARAMETER): Invalid parameter given.
- 234 (ERROR_MORE_DATA): Part of the information requested was returned, but there was not enough room for all the data. *plOutCount contains the size of buffer needed to retrieve all the query response data.
- 2123 (NERR_BufTooSmall): No information was returned because the output buffer was too small. *plOutCount contains the size of buffer needed to retrieve all the query response data.
- 2151 (NERR_JobNotFound): No spooler job found.
Remarks
The following function is related to GreEscape DEVESC_GETJOBID(8160L): GreEscape DEVESC_ENDDOC.
Sample Source Code
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> LONG lInCount; /* Not used; must be set to 0 (zero). */ PBYTE pbInData; /* Not used; must be set to NULL. */ PLONG plOutCount; /* The number of bytes pointed to or used by '''pbOutData'''. */ PLONG pbOutData; /* Buffer to receive [[QMJOBINFO]] data structure. */ LONG rc; /* Return Code. */ rc = GreEscape(lInCount, pbInData, plOutCount, pbOutData);