Jump to content

SplQmEndDoc: Difference between revisions

From EDM2
Created page with "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 = Sp..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
SplQmEndDoc ends a print job, and returns ulJob, a unique number to identify the job. This function corresponds to the DevEscape (DEVESC_ENDDOC) call.  
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==
==Syntax==
Line 5: Line 5:


==Parameters==
==Parameters==
; hspl (HSPL) - input  
;hspl (HSPL) - input: Spooler handle.
: Spooler handle.  


==Return Code==
==Return Code==
; ulJob (ULONG) - returns  
;ulJob (ULONG) - returns: Job identifier.
: Job identifier.  
* Nonzero - Jobid (1 through 65,535)
 
* SPL_ERROR - Error
* Nonzero  
;Error Conditions: Possible returns from WinGetLastError
  Jobid (1 through 65,535)  
*PMERR_SPL_QUEUE_ERROR (0x4004) No spooler queue supplied or found.
* SPL_ERROR  
*PMERR_SPL_NO_DATA (0x400D) No data supplied or found.
Error  
*PMERR_SPL_INV_HSPL (0x4005) The spooler handle is invalid.
 
; Error Conditions: Possible returns from WinGetLastError  
 
* PMERR_SPL_QUEUE_ERROR (0x4004)  
No spooler queue supplied or found.  
 
* PMERR_SPL_NO_DATA (0x400D)  
No data supplied or found.  
 
* PMERR_SPL_INV_HSPL (0x4005)  
The spooler handle is invalid.  
 


==Remarks==
==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.  
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.


==Example Code==
<PRE>
<PRE>
#define INCL_SPL
#define INCL_SPL
Line 50: Line 38:
     0,                        /* message box id        */
     0,                        /* message box id        */
     MB_NOICON | MB_OK);        /* icon and button flags */
     MB_NOICON | MB_OK);        /* icon and button flags */
</PRE>
==Example Code==
<PRE>
#define INCL_SPL /* Or use INCL_PM, */
#include <os2.h>
HSPL    hspl;  /*  Spooler handle. */
ULONG    ulJob;  /*  Job identifier. */
ulJob = SplQmEndDoc(hspl);
</PRE>
</PRE>


==Related Functions==
==Related Functions==
; Prerequisite Functions  
;Prerequisite Functions: SplQmOpen
: SplQmOpen  
: SplQmStartDoc
: SplQmStartDoc  
;Related Functions: DevEscape
; Related Functions  
: DevEscape  
 


[[Category:Spl]]
[[Category:Spl]]

Latest revision as of 23:21, 8 June 2021

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.
  • Nonzero - Jobid (1 through 65,535)
  • SPL_ERROR - Error
Error Conditions
Possible returns from WinGetLastError
  • PMERR_SPL_QUEUE_ERROR (0x4004) No spooler queue supplied or found.
  • PMERR_SPL_NO_DATA (0x400D) No data supplied or found.
  • PMERR_SPL_INV_HSPL (0x4005) The spooler handle is invalid.

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.

Example Code

#define INCL_SPL
#include <OS2.H>

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 */

Related Functions

Prerequisite Functions
SplQmOpen
SplQmStartDoc
Related Functions
DevEscape