SplQmStartDoc

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

A parameter to the function contained invalid data.
 * PMERR_INVALID_PARM (0x1303)

No spooler queue supplied or found.
 * PMERR_SPL_QUEUE_ERROR (0x4004)

A request to close the spooled output without first issuing a an ENDDOC was attempted.
 * PMERR_ENDDOC_NOT_ISSUED (0x210B)

The spooler handle is invalid.
 * PMERR_SPL_INV_HSPL (0x4005)

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.


 * 1) define INCL_SPL
 * 2) include 

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

Example Code

 * 1) define INCL_SPL /* Or use INCL_PM, */
 * 2) include 

HSPL   hspl;        /*  Spooler handle. */ PSZ    pszDocName;  /*  Document name. */ BOOL   rc;          /*  Success indicator. */

rc = SplQmStartDoc(hspl, pszDocName); 

Related Functions

 * Prerequisite Functions
 * SplQmOpen


 * Related Functions
 * DevEscape