ControlPrintProcessor


BOOL  WinprintControlPrintProcessor(
    HANDLE  hPrintProcessor,
    DWORD   Command,
    DWORD   JobId,
    LPTSTR  pDatatype,
    LPTSTR  pSpoolFile
);

Provides control over printing the current document.

hPrintProcessor

A handle to an open instance of a print processor to control.

Command

Commands used in the spooler's default local print processor are:


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.


JobId

Identifies the job associated with the spool file (not used by the default print processor).

pDatatype

Points to a memory location that contains the spool file datatype (PRINTPROCESSOR_TYPE_RAW or PRINTPROCESSOR_TYPE_EMF for the default print processor).

pSpoolFile

Points to the name of the spool file.


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