Bagikan melalui


Metode Properti IADsPrintQueue

Metode properti antarmuka IADsPrintQueue mendapatkan atau mengatur properti yang dijelaskan dalam tabel berikut. Untuk informasi selengkapnya, lihat Metode Properti Antarmuka.

Properti

Halaman Spanduk

Jalur sistem file yang menunjuk ke halaman banner yang digunakan untuk memisahkan pekerjaan cetak. Jika NULL, tidak ada halaman banner yang digunakan.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

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

Datatype

Jenis data yang dapat diproses oleh antrean ini.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_Datatype(
  [out] BSTR* pbstrDatatype
);
HRESULT put_Datatype(
  [in] BSTR bstrDatatype
);

DefaultJobPriority

Prioritas default yang ditetapkan untuk setiap pekerjaan cetak.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_DefaultJobPriority(
  [out] LONG* plDefaultJobPriority
);
HRESULT put_DefaultJobPriority(
  [in] BSTR lDefaultJobPriority
);

Deskripsi

Deskripsi teks dari antrean cetak ini.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_Description(
  [out] BSTR* pbstrDescription
);
HRESULT put_Description(
  [in] BSTR bstrDescription
);

HostComputer

String ADsPath yang mereferensikan komputer host.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

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

Lokasi

Lokasi antrean seperti yang dijelaskan oleh administrator.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_Location(
  [out] BSTR* pbstrLocation
);
HRESULT put_Location(
  [in] BSTR bstrLocation
);

Model

Nama pengandar yang digunakan oleh antrean cetak ini.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_Model(
  [out] BSTR* pbstrModel
);
HRESULT put_Model(
  [in] BSTR bstrModel
);

PrintDevices

SAFEARRAY BSTR yang berisi nama perangkat cetak tempat antrean cetak ini menampung pekerjaan.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: VARIAN

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

PrinterPath

String yang mereferensikan jalur tempat printer bersama dapat diakses.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_PrinterPath(
  [out] BSTR* pbstrPrinterPath
);
HRESULT put_PrinterPath(
  [in] BSTR bstrPrinterPath
);

PrintProcessor

Prosesor cetak yang terkait dengan antrean ini.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: BSTR

// C++ method syntax
HRESULT get_PrintProcessor(
  [out] BSTR* pbstrPrintProcessor
);
HRESULT put_PrintProcessor(
  [in] BSTR bstrPrintProcessor
);

Prioritas

Prioritas antrean tugas objek printer ini untuk perangkat yang terhubung. Semua pekerjaan dalam objek antrean cetak prioritas yang lebih tinggi akan diproses terlebih dahulu.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: LONG

// C++ method syntax
HRESULT get_Priority(
  [out] LONG* plPriority
);
HRESULT put_Priority(
  [in] LONG lPriority
);

StartTime

Waktu ketika antrean harus mulai memproses pekerjaan. Bagian tanggal waktu diabaikan.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: TANGGAL

// C++ method syntax
HRESULT get_StartTime(
  [out] DATE* pdateStartTime
);
HRESULT put_StartTime(
  [in] DATE dateStartTime
);

UntilTime

Waktu ketika antrean harus berhenti memproses pekerjaan.

Jenis akses: Baca/tulis

Jenis data pembuatan skrip: TANGGAL

// C++ method syntax
HRESULT get_UntilTime(
  [out] DATE* pdateUntilTime
);
HRESULT put_UntilTime(
  [in] DATE dateUntilTime
);

Contoh

Contoh kode berikut menunjukkan cara menentukan apakah printer tertentu sedang online atau offline.

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

Contoh kode berikut menunjukkan cara menentukan apakah printer tertentu sedang online atau offline.

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

Persyaratan

Persyaratan Nilai
Klien minimum yang didukung
Windows Vista
Server minimum yang didukung
Windows Server 2008
Header
Iads.h
DLL
Activeds.dll
IID
IID_IADsPrintQueue didefinisikan sebagai B15160D0-1226-11CF-A985-00AA006BC149

Lihat juga

IADsPrintQueue

Metode Properti Antarmuka