ReportJobProcessingProgress function winspool

void ReportJobProcessingProgress(
  1. HANDLE printerHandle,
  2. int jobId,
  3. EPrintXPSJobOperation jobOperation,
  4. EPrintXPSJobProgress jobProgress,
)

Reports to the Print Spooler service whether an XPS print job is in the spooling or the rendering phase and what part of the processing is currently underway.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/printdocs/reportjobprocessingprogress.

Implementation

@pragma('vm:prefer-inline')
void ReportJobProcessingProgress(
  HANDLE printerHandle,
  int jobId,
  EPrintXPSJobOperation jobOperation,
  EPrintXPSJobProgress jobProgress,
) {
  final hr$ = HRESULT(
    _ReportJobProcessingProgress(
      printerHandle,
      jobId,
      jobOperation,
      jobProgress,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}