The EndDoc function ends a print job. This function replaces the ENDDOC printer escape.
int EndDoc(
HDC hdc // handle to device context
);
If the function succeeds, the return value is greater than zero.
If the function fails, the return value is less than or equal to zero.
Windows NT: To get extended error information, call GetLastError.
Applications should call EndDoc immediately after finishing a print job.
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.
Printing and Print Spooler Overview, Printing and Print Spooler Functions, StartDoc