Windows GDI
SetAbortProc
The SetAbortProc function sets the application-defined abort function that allows a print job to be canceled during spooling.
int SetAbortProc(
HDC hdc, // handle to DC
ABORTPROC lpAbortProc // abort function
);
Parameters
- hdc
- [in] Handle to the device context for the print job.
- lpAbortProc
- [in] 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/2000/XP: To get extended error information, call GetLastError.
Example Code
For an example, see Preparing to Print.
Windows NT/2000/XP/Vista: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
See Also
Printing and Print Spooler Overview, Printing and Print Spooler Functions, AbortDoc, AbortProc