ABORTPROC callback function (wingdi.h)

The AbortProc function is an application-defined callback function used with the SetAbortProc function. It is called when a print job is to be canceled during spooling. The ABORTPROC type defines a pointer to this callback function. AbortProc is a placeholder for the application-defined function name.

Syntax

ABORTPROC Abortproc;

BOOL Abortproc(
  HDC unnamedParam1,
  int unnamedParam2
)
{...}

Parameters

unnamedParam1

unnamedParam2

Return value

The callback function should return TRUE to continue the print job or FALSE to cancel the print job.

Remarks

Note  This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation—factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.
 
If the iError parameter is SP_OUTOFDISK, the application need not cancel the print job. If it does not cancel the job, it must yield to Print Manager by calling the PeekMessage or GetMessage function.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)

See also

GetMessage

PeekMessage

Print Spooler API Functions

Printing

SetAbortProc