CDC::EndDoc 

intEndDoc();

Return Value

Greater than or equal to 0 if the function is successful, or a negative value if an error occurred. The following list shows common error values:

  • SP_ERROR   General error.

  • SP_OUTOFDISK   Not enough disk space is currently available for spooling, and no more space will become available.

  • SP_OUTOFMEMORY   Not enough memory is available for spooling.

  • SP_USERABORT   User ended the job through the Print Manager.

Remarks

Ends a print job started by a call to the StartDoc member function. This member function replaces the ENDDOC printer escape, and should be called immediately after finishing a successful print job.

If an application encounters a printing error or a canceled print operation, it must not attempt to terminate the operation by using either EndDoc or AbortDoc. GDI automatically terminates the operation before returning the error value.

This function should not be used inside metafiles.

Example

See the example for CDC::StartDoc.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::AbortDoc, CDC::Escape, CDC::StartDoc