Microsoft Windows CE 3.0  


This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function stops the current print job.

int AbortDoc( HDC


[in] Handle to the device context (DC) for the print job.

Return Values

A value greater than zero indicates success. SP_ERROR indicates failure. To get extended error information, call GetLastError.


Applications should call the AbortDocfunction to stop a print job if an error occurs, or to stop a print job after the user cancels that job. To end a successful print job, an application should call the EndDocfunction.

If Print Manager was used to start the print job, calling AbortDocerases 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.


Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wingdi.h   Mgprint.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

EndDoc, GetLastError, SetAbortProc, StartDoc