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
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_BannerPage( [out] BSTR* pbstrBannerPage ); HRESULT put_BannerPage( [in] BSTR bstrBannerPage );
Jalur sistem file yang menunjuk ke halaman banner yang digunakan untuk memisahkan pekerjaan cetak. Jika NULL, tidak ada halaman banner yang digunakan.
-
-
Datatype
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_Datatype( [out] BSTR* pbstrDatatype ); HRESULT put_Datatype( [in] BSTR bstrDatatype );
Jenis data yang dapat diproses oleh antrean ini.
-
-
DefaultJobPriority
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_DefaultJobPriority( [out] LONG* plDefaultJobPriority ); HRESULT put_DefaultJobPriority( [in] BSTR lDefaultJobPriority );
Prioritas default yang ditetapkan untuk setiap pekerjaan cetak.
-
-
Deskripsi
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_Description( [out] BSTR* pbstrDescription ); HRESULT put_Description( [in] BSTR bstrDescription );
Deskripsi teks dari antrean cetak ini.
-
-
HostComputer
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_HostComputer( [out] BSTR* pbstrHostComputer ); HRESULT put_HostComputer( [in] BSTR bstrHostComputer );
String ADsPath yang mereferensikan komputer host.
-
-
Lokasi
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_Location( [out] BSTR* pbstrLocation ); HRESULT put_Location( [in] BSTR bstrLocation );
Lokasi antrean seperti yang dijelaskan oleh administrator.
-
-
Model
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_Model( [out] BSTR* pbstrModel ); HRESULT put_Model( [in] BSTR bstrModel );
Nama pengandar yang digunakan oleh antrean cetak ini.
-
-
PrintDevices
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: VARIAN
-
// C++ method syntax HRESULT get_PrintDevices( [out] VARIANT* pvPrintDevices ); HRESULT put_PrintDevices( [in] VARIANT vPrintDevices );
SAFEARRAY BSTR yang berisi nama perangkat cetak tempat antrean cetak ini menampung pekerjaan.
-
-
PrinterPath
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_PrinterPath( [out] BSTR* pbstrPrinterPath ); HRESULT put_PrinterPath( [in] BSTR bstrPrinterPath );
String yang mereferensikan jalur tempat printer bersama dapat diakses.
-
-
PrintProcessor
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: BSTR
-
// C++ method syntax HRESULT get_PrintProcessor( [out] BSTR* pbstrPrintProcessor ); HRESULT put_PrintProcessor( [in] BSTR bstrPrintProcessor );
Prosesor cetak yang terkait dengan antrean ini.
-
-
Prioritas
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: LONG
-
// C++ method syntax HRESULT get_Priority( [out] LONG* plPriority ); HRESULT put_Priority( [in] LONG lPriority );
Prioritas antrean tugas objek printer ini untuk perangkat yang terhubung. Semua pekerjaan dalam objek antrean cetak prioritas yang lebih tinggi akan diproses terlebih dahulu.
-
-
StartTime
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: TANGGAL
-
// C++ method syntax HRESULT get_StartTime( [out] DATE* pdateStartTime ); HRESULT put_StartTime( [in] DATE dateStartTime );
Waktu ketika antrean harus mulai memproses pekerjaan. Bagian tanggal waktu diabaikan.
-
-
UntilTime
-
-
Jenis akses: Baca/tulis
-
Jenis data pembuatan skrip: TANGGAL
-
// C++ method syntax HRESULT get_UntilTime( [out] DATE* pdateUntilTime ); HRESULT put_UntilTime( [in] DATE dateUntilTime );
Waktu ketika antrean harus berhenti memproses pekerjaan.
-
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 |
|
DLL |
|
IID |
IID_IADsPrintQueue didefinisikan sebagai B15160D0-1226-11CF-A985-00AA006BC149 |