ControlPrintProcessor

BOOL ControlPrintProcessor(

    HANDLE  hPrintProcessor,

    DWORD  Command

   );

ControlPrintProcessor provides control over printing the document.

Parameters

hPrintProcessor
Handle to an open instance of the print processor to which to send the command.
Command
This parameter can be one of the following values:

Value

Meaning

JOB_CONTROL_PAUSE

Pauses the print job.

JOB_CONTROL_RESUME

Resumes the print job at the point in the spool file where it was paused.

JOB_CONTROL_CANCEL

Cancels the print job.

Return Value

The function returns TRUE if it is successful. Otherwise it returns FALSE, and the logged error can be retrieved by a call to GetLastError.

Comments

Calls to this function can occur asynchronously; the function should not wait for the result. For example, the function call could set a flag and exit immediately.

See Also

OpenPrintProcessor