SplQmStartDoc: Difference between revisions
Appearance
Created page with "SplQmStartDoc starts a print job. It corresponds to the DevEscape (DEVESC_STARTDOC) call. ==Syntax== rc = SplQmStartDoc(hspl, pszDocName); ==Parameters== ; hspl (HSPL) - in..." |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
SplQmStartDoc starts a print job. It corresponds to the DevEscape (DEVESC_STARTDOC) call. | SplQmStartDoc starts a print job. It corresponds to the [[DevEscape]] (DEVESC_STARTDOC) call. | ||
==Syntax== | ==Syntax== | ||
rc = SplQmStartDoc(hspl, pszDocName); | rc = SplQmStartDoc(hspl, pszDocName); | ||
==Parameters== | ==Parameters== | ||
; hspl (HSPL) - input | ;hspl (HSPL) - input: Spooler handle. | ||
: Spooler handle. | ;pszDocName (PSZ) - input: Document name. | ||
:This is part of the job description that is displayed to the end user by the spooler. | |||
; pszDocName (PSZ) - input | |||
: Document name. | |||
This is part of the job description that is displayed to the end user by the spooler. | |||
==Return Code== | ==Return Code== | ||
; rc (BOOL) - returns | ;rc (BOOL) - returns: Success indicator. | ||
: Success indicator. | * TRUE Successful completion | ||
* FALSE Error occurred. | |||
* TRUE Successful completion | ;Error Conditions: Possible returns from WinGetLastError | ||
* FALSE Error occurred. | * PMERR_INVALID_PARM (0x1303) - A parameter to the function contained invalid data. | ||
* PMERR_SPL_QUEUE_ERROR (0x4004) - No spooler queue supplied or found. | |||
; Error Conditions: Possible returns from WinGetLastError | * PMERR_ENDDOC_NOT_ISSUED (0x210B) - A request to close the spooled output without first issuing an ENDDOC was attempted. | ||
* PMERR_SPL_INV_HSPL (0x4005) - The spooler handle is invalid. | |||
* PMERR_INVALID_PARM (0x1303) | |||
A parameter to the function contained invalid data. | |||
* PMERR_SPL_QUEUE_ERROR (0x4004) | |||
No spooler queue supplied or found. | |||
* PMERR_ENDDOC_NOT_ISSUED (0x210B) | |||
A request to close the spooled output without first issuing | |||
* PMERR_SPL_INV_HSPL (0x4005) | |||
The spooler handle is invalid. | |||
==Remarks== | ==Remarks== | ||
This function indicates the start of a print job. It allows the application to specify a document name to be associated with the print job. | This function indicates the start of a print job. It allows the application to specify a document name to be associated with the print job. | ||
Multiple print jobs can be generated, within a single queue manager open, by bracketing each job with SplQmStartDoc and SplQmEndDoc. | Multiple print jobs can be generated, within a single queue manager open, by bracketing each job with SplQmStartDoc and [[SplQmEndDoc]]. | ||
==Example Code== | |||
<PRE> | <PRE> | ||
#define INCL_SPL | #define INCL_SPL | ||
Line 49: | Line 36: | ||
sprintf(szMsg, "Starting job named: %s",szDocName); | sprintf(szMsg, "Starting job named: %s",szDocName); | ||
WinMessageBox(HWND_DESKTOP, | WinMessageBox(HWND_DESKTOP, | ||
hwndClient, /* client-window handle | hwndClient, /* client-window handle */ | ||
szMsg, /* body of the message | szMsg, /* body of the message */ | ||
"Printing Information", /* title of the message */ | "Printing Information", /* title of the message */ | ||
0, /* message box id | 0, /* message box id */ | ||
MB_NOICON | MB_OK); /* icon and button flags */ | MB_NOICON | MB_OK); /* icon and button flags */ | ||
SplQmStartDoc(hspl,szDocName); | SplQmStartDoc(hspl,szDocName); | ||
</PRE> | </PRE> | ||
==Related Functions== | ==Related Functions== | ||
; Prerequisite Functions | ;Prerequisite Functions: [[SplQmOpen]] | ||
: [[SplQmOpen]] | ;Related Functions: [[DevEscape]] | ||
; Related Functions | |||
: [[DevEscape]] | |||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 20:26, 2 July 2023
SplQmStartDoc starts a print job. It corresponds to the DevEscape (DEVESC_STARTDOC) call.
Syntax
rc = SplQmStartDoc(hspl, pszDocName);
Parameters
- hspl (HSPL) - input
- Spooler handle.
- pszDocName (PSZ) - input
- Document name.
- This is part of the job description that is displayed to the end user by the spooler.
Return Code
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion
- FALSE Error occurred.
- Error Conditions
- Possible returns from WinGetLastError
- PMERR_INVALID_PARM (0x1303) - A parameter to the function contained invalid data.
- PMERR_SPL_QUEUE_ERROR (0x4004) - No spooler queue supplied or found.
- PMERR_ENDDOC_NOT_ISSUED (0x210B) - A request to close the spooled output without first issuing an ENDDOC was attempted.
- PMERR_SPL_INV_HSPL (0x4005) - The spooler handle is invalid.
Remarks
This function indicates the start of a print job. It allows the application to specify a document name to be associated with the print job.
Multiple print jobs can be generated, within a single queue manager open, by bracketing each job with SplQmStartDoc and SplQmEndDoc.
Example Code
#define INCL_SPL #include <OS2.H> HSPL hspl; /* spooler handle. */ CHAR szDocName[] = "Test Job"; CHAR szMsg[100]; HWND hwndClient; sprintf(szMsg, "Starting job named: %s",szDocName); WinMessageBox(HWND_DESKTOP, hwndClient, /* client-window handle */ szMsg, /* body of the message */ "Printing Information", /* title of the message */ 0, /* message box id */ MB_NOICON | MB_OK); /* icon and button flags */ SplQmStartDoc(hspl,szDocName);