SetAbortProc

The SetAbortProc function sets the application-defined abort function that allows a print job to be canceled during spooling. This function replaces the SETABORTPROC printer escape.

int SetAbortProc(
  HDC hdc,                // handle to device context
  ABORTPROC lpAbortProc   // address of abort function
);
 

Parameters

hdc
Handle to the device context for the print job.
lpAbortProc
Pointer to the application-defined abort function. For more information about the callback function, see the AbortProc callback function.

Return Values

If the function succeeds, the return value is greater than zero.

If the function fails, the return value is SP_ERROR.

Windows NT: To get extended error information, call GetLastError.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 2.0 or later.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Printing and Print Spooler Overview, Printing and Print Spooler Functions, AbortDoc, AbortProc