SplQmEndDoc

SplQmEndDoc ends a print job, and returns ulJob, a unique number to identify the job. This function corresponds to the DevEscape (DEVESC_ENDDOC) call.

Syntax
ulJob = SplQmEndDoc(hspl);

Parameters

 * hspl (HSPL) - input
 * Spooler handle.

Return Code

 * ulJob (ULONG) - returns
 * Job identifier.

Jobid (1 through 65,535) Error
 * Nonzero
 * SPL_ERROR


 * Error Conditions: Possible returns from WinGetLastError

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

No data supplied or found.
 * PMERR_SPL_NO_DATA (0x400D)

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

Remarks
This function is used to end a print job and return the job id. The print-job identifier is displayed to the user by the spooler while this job is on the queue, and while it is being printed.


 * 1) define INCL_SPL
 * 2) include 

HSPL hspl; /* spooler handle. */ ULONG jobid; CHAR szMsg[100]; HWND hwndClient;

jobid = SplQmEndDoc(hspl);

sprintf(szMsg, "ending job %d",jobid); 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 */ 

Example Code

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

HSPL    hspl;   /*  Spooler handle. */ ULONG   ulJob;  /*  Job identifier. */

ulJob = SplQmEndDoc(hspl);



Related Functions

 * Prerequisite Functions
 * SplQmOpen
 * SplQmStartDoc


 * Related Functions
 * DevEscape