Share via


ReportPrinterStatus (Compact 2013)

3/26/2014

This function returns the status of a printer or printing operation that is in progress.

Syntax

BOOL WINAPI ReportPrinterStatus(
  DWORD dwStatus,
  LPCTSTR lpPortName,
  LPCTSTR lpPrinterName,
  LPARAM lparam 
);

Parameters

  • dwStatus
    [out] Printer status, indicated by one of the following flags:

    • PRINTER_E_OFFLINE
    • PRINTER_E_NOPAPER
    • PRINTER_E_DEVICE_FAULT
    • PRINTER_E_TIMEOUT
    • PRINTER_E_PAPERJAM
    • PRINTER_N_JOB_COMPLETE
    • PRINTER_N_PRINTING
  • lpPortName
    [in] Pointer to the printer port.
  • lpPrinterName
    [in] Pointer to the printer name.
  • lparam
    [in] 32-bit message parameter.

Return Value

TRUE if successful, FALSE otherwise.

Remarks

This function uses a registry setting to determine printer time-out errors for serial printing. The time-out default value is 45 seconds, and can be changed with the HKEY_LOCAL_MACHINE\PrintSettings\TimeOut registry key.

Requirements

Header

prnport.h

See Also

Reference

Printer Driver Functions