IXpsPrintJob::GetJobStatus method (xpsprint.h)

[IXpsPrintJob::GetJobSatus is not supported and may be altered or unavailable in the future. ]

Gets the current status of the print job.

Syntax

HRESULT GetJobStatus(
  [out, retval] XPS_JOB_STATUS *jobStatus
);

Parameters

[out, retval] jobStatus

The current status of the print job. For information about the data that is returned in this structure, see XPS_JOB_STATUS.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Remarks

GetJobStatus may be called during the print job processing or after the print job has completed. The values returned in XPS_JOB_STATUS represent the current state of the print job at the time GetJobStatus is called, so it is possible to miss intermediate states between calls to this method.

The values of jobStatus.currentDocument and jobStatus.currentPage are guaranteed to progress sequentially: from the first document to the last, and from the first page to the last within each document.

The job ID of a print job that has been sent to the Microsoft XPS Document Writer (MXDW) is zero. If the interface is that of a print job that has been sent to the MXDW, zero will be returned in jobStatus.jobId.

If no job ID has been assigned to the print job, or the print job is printed without spooling, zero will be returned in jobStatus.jobId.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header xpsprint.h

See also

Documents

IXpsPrintJob

XML Paper Specification

XPS_JOB_COMPLETION

XPS_JOB_STATUS