AbortDoc function (wingdi.h)
The AbortDoc function stops the current print job and erases everything drawn since the last call to the StartDoc function.
Syntax
int AbortDoc(
[in] HDC hdc
);
Parameters
[in] hdc
Handle to the device context for the print job.
Return value
If the function succeeds, the return value is greater than zero.
If the function fails, the return value is SP_ERROR.
Remarks
If Print Manager was used to start the print job, calling AbortDoc erases the entire spool job, so that the printer receives nothing. If Print Manager was not used to start the print job, the data may already have been sent to the printer. In this case, the printer driver resets the printer (when possible) and ends the print job.
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) |
Library | Gdi32.lib |
DLL | Gdi32.dll |