IADsPrintQueue 속성 메서드
IADsPrintQueue 인터페이스의 속성 메서드는 다음 표에 설명된 속성을 가져오거나 설정합니다. 자세한 내용은 Interface 속성 메서드를 참조하세요.
속성
-
BannerPage
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_BannerPage( [out] BSTR* pbstrBannerPage ); HRESULT put_BannerPage( [in] BSTR bstrBannerPage );
인쇄 작업을 구분하는 데 사용되는 배너 페이지를 가리키는 파일 시스템 경로입니다. NULL인 경우 배너 페이지가 사용되지 않습니다.
-
-
데이터 형식
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_Datatype( [out] BSTR* pbstrDatatype ); HRESULT put_Datatype( [in] BSTR bstrDatatype );
이 큐에서 처리할 수 있는 데이터 형식입니다.
-
-
DefaultJobPriority
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_DefaultJobPriority( [out] LONG* plDefaultJobPriority ); HRESULT put_DefaultJobPriority( [in] BSTR lDefaultJobPriority );
각 인쇄 작업에 할당된 기본 우선 순위입니다.
-
-
설명
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_Description( [out] BSTR* pbstrDescription ); HRESULT put_Description( [in] BSTR bstrDescription );
이 인쇄 큐의 텍스트 설명입니다.
-
-
HostComputer
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_HostComputer( [out] BSTR* pbstrHostComputer ); HRESULT put_HostComputer( [in] BSTR bstrHostComputer );
호스트 컴퓨터를 참조하는 ADsPath 문자열입니다.
-
-
위치
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_Location( [out] BSTR* pbstrLocation ); HRESULT put_Location( [in] BSTR bstrLocation );
관리자가 설명한 대로 큐의 위치입니다.
-
-
모델
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_Model( [out] BSTR* pbstrModel ); HRESULT put_Model( [in] BSTR bstrModel );
이 인쇄 큐에서 사용하는 드라이버의 이름입니다.
-
-
PrintDevices
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: VARIANT
-
// C++ method syntax HRESULT get_PrintDevices( [out] VARIANT* pvPrintDevices ); HRESULT put_PrintDevices( [in] VARIANT vPrintDevices );
이 인쇄 큐가 작업을 스풀하는 인쇄 디바이스의 이름을 포함하는 BSTR 의 SAFEARRAY입니다.
-
-
PrinterPath
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_PrinterPath( [out] BSTR* pbstrPrinterPath ); HRESULT put_PrinterPath( [in] BSTR bstrPrinterPath );
공유 프린터에 액세스할 수 있는 경로를 참조하는 문자열입니다.
-
-
PrintProcessor
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: BSTR
-
// C++ method syntax HRESULT get_PrintProcessor( [out] BSTR* pbstrPrintProcessor ); HRESULT put_PrintProcessor( [in] BSTR bstrPrintProcessor );
이 큐와 연결된 인쇄 프로세서입니다.
-
-
우선 순위
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: LONG
-
// C++ method syntax HRESULT get_Priority( [out] LONG* plPriority ); HRESULT put_Priority( [in] LONG lPriority );
연결된 디바이스에 대한 이 프린터 개체 작업 큐의 우선 순위입니다. 우선 순위가 높은 인쇄 큐 개체의 모든 작업이 먼저 처리됩니다.
-
-
StartTime
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: DATE
-
// C++ method syntax HRESULT get_StartTime( [out] DATE* pdateStartTime ); HRESULT put_StartTime( [in] DATE dateStartTime );
큐에서 작업 처리를 시작해야 하는 시간입니다. 시간의 날짜 부분은 무시됩니다.
-
-
UntilTime
-
-
액세스 형식: 읽기/쓰기
-
스크립팅 데이터 형식: DATE
-
// C++ method syntax HRESULT get_UntilTime( [out] DATE* pdateUntilTime ); HRESULT put_UntilTime( [in] DATE dateUntilTime );
큐가 작업 처리를 중지해야 하는 시간입니다.
-
예제
다음 코드 예제에서는 지정한 프린터가 온라인 또는 오프라인 상태인지 확인하는 방법을 보여줍니다.
Dim pq As IADsPrintQueue
Dim pqo As IADsPrintQueueOperations
On Error GoTo Cleanup
Set pq = GetObject("WinNT://aMachine/aPrinter")
Set pqo = pq
If pqo.status = ADS_PRINTER_OFFLINE Then
MsgBox pq.Model & "@" & pq.Location & is offline."
Else
MsgBox pq.Model & "@" & pq.Location & is online."
End If
Cleanup:
If (Err.Number<>0) Then
MsgBox("An error has occurred. " & Err.Number)
End If
Set pq = Nothing
Set pqo = Nothing
다음 코드 예제에서는 지정한 프린터가 온라인 또는 오프라인 상태인지 확인하는 방법을 보여줍니다.
IADsPrintQueue *pq = NULL;
HRESULT hr = S_OK;
IADsPrintQueueOperations *pqo = NULL;
BSTR model = NULL;
BSTR location = NULL;
LPWSTR adsPath = L"WinNT://aMachine/aPrinter";
hr = ADsGetObject(adsPath,
IID_IADsPrintQueue,
(void**)&pq);
if(FAILED(hr)) {goto Cleanup;}
hr = pq->QueryInterface(IID_IADsPrintQueueOperations,(void**)&pqo);
if(FAILED(hr)) {goto Cleanup;}
long status;
hr = pqo->get_Status(&status);
if(FAILED(hr)) {goto Cleanup;}
hr = pq->get_Model(&model);
if(FAILED(hr)) {goto Cleanup;}
hr =pq->get_Location(&location);
if(FAILED(hr)) {goto Cleanup;}
if(status == ADS_PRINTER_OFFLINE)
{
printf("%S @ %S is offline.\n",model,location);
}
else
{
printf("%S @ %S is online.\n",model,location);
}
Cleanup:
SysFreeString(model);
SysFreeString(location);
if(pq) pq->Release();
if(pqo) pqo->Release();
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 |
Windows Vista |
지원되는 최소 서버 |
Windows Server 2008 |
헤더 |
|
DLL |
|
IID |
IID_IADsPrintQueue B15160D0-1226-11CF-A985-00AA006BC149로 정의됩니다. |