Partager via


ReportPrinterStatus

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

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

Parameters

  • dwStatus
    [out] Status of the printer. 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 Values

TRUE if successful, FALSE otherwise.

Remarks

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Prnport.h.

See Also

Printer Drivers

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.