Directory Services |
The property methods of the IADsPrintQueueOperations interface read and write the properties listed in the following table. For more information about property methods, see Interface Property Methods.
Property | Description |
---|---|
Status
[Visual Basic] [C++] |
Current status of the print queue operations. The
valid status code values are listed in the following table.
|
The following Visual Basic code example verifies that a printer is jammed.
Dim pqo As IADsPrintQueueOperations Set pqo = GetObject("WinNT://aMachine/aPrinter") If pqo.Status = ADS_PRINTER_PAPER_JAM Then MsgBox "Your printer is jammed." End If
The following C++ code example verifies that a printer is jammed.
IADsPrintQueueOperations *pqo; HRESULT hr = ADsGetObject(L"WinNT://aMachine/aPrinter", IID_IADsPrintQueueOperations, (void**)&pqo) long status; hr = pqo->get_Status(&status); if(status = ADS_PRINTER_PAPER_JAM) { printf("Your printer is jammed.\n"); } hr = pqo->Release();
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.