ENDDOC

Syntax

short Escape(hDC, ENDDOC,NULL, NULL, NULL)

This escape ends a print job started by a STARTDOC escape.

Parameter Type/Description  

hDC HDC Identifies the device context.  

Return Value

The return value specifies the outcome of the escape. It is positive if the escape is successful. Otherwise, it is negative.

Comments

If an application encounters a printing error or a canceled print operation, it must not attempt to terminate the operation by using the Escape function with either the ENDDOC or ABORTDOC escape. GDI automatically terminates the operation before returning the error value.

If the application displays a dialog box to allow the user to cancel the print operation, it must send the ENDDOC escape before destroying the dialog box.

The application must send the ENDDOC escape before freeing the procedure-instance address of the abort function, if any.