次の方法で共有


IADsPrintQueue プロパティ メソッド

IADsPrintQueue インターフェイスのプロパティ メソッドは、次の表で説明するプロパティを取得または設定します。 詳細については、「インターフェイス プロパティ メソッド」を参照してください

プロパティ

BannerPage

印刷ジョブを分離するために使用されるバナー ページを指すファイル システム パス。 NULL の場合、バナー ページは使用されません。

アクセスの種類: 読み取り/書き込み

スクリプト データ型: BSTR

// C++ method syntax
HRESULT get_BannerPage(
  [out] BSTR* pbstrBannerPage
);
HRESULT put_BannerPage(
  [in] BSTR bstrBannerPage
);

Datatype

このキューで処理できるデータ型。

アクセスの種類: 読み取り/書き込み

スクリプト データ型: 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

ホスト コンピューターを参照する ADsPath 文字列。

アクセスの種類: 読み取り/書き込み

スクリプト データ型: BSTR

// C++ method syntax
HRESULT get_HostComputer(
  [out] BSTR* pbstrHostComputer
);
HRESULT put_HostComputer(
  [in] BSTR bstrHostComputer
);

場所

管理者が説明するキューの場所。

アクセスの種類: 読み取り/書き込み

スクリプト データ型: 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

この印刷キューがジョブをスプールする印刷装置の名前を含む BSTR の SAFEARRAY

アクセスの種類: 読み取り/書き込み

スクリプト データ型: VARIANT

// C++ method syntax
HRESULT get_PrintDevices(
  [out] VARIANT* pvPrintDevices
);
HRESULT put_PrintDevices(
  [in] VARIANT vPrintDevices
);

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();

要件

要件 Value
サポートされている最小のクライアント
Windows Vista
サポートされている最小のサーバー
Windows Server 2008
ヘッダー
Iads.h
[DLL]
Activeds.dll
IID
IID_IADsPrintQueueは、B15160D0-1226-11CF-A985-00AA006BC149 として定義されます

関連項目

IADsPrintQueue

Interface プロパティ メソッド