MsSnaStatus_PrintSession 類別

MsSnaStatus_PrintSession類別代表 SNA 列印會話狀態。

語法

  
class MsSnaStatus_PrintSession : MsSnaStatus_Config  
{  
   string Name;  
   uint32 Status;  
   string StatusText;  
   uint32 PrintState;  
   uint16 Type;  
}  

屬性

名稱
資料類型: 字串 限定詞: 金鑰 存取類型:Read-Only

會話的唯一識別碼。

狀態
資料類型: sint32 存取類型:Read-Only

服務的目前狀態。 下表描述 Status的可能值。

描述
0 非使用中
1 暫止
2 停止中
3 使用中

StatusText
資料類型: 字串 存取類型:Read-Only

其中一個 Status 值。 下列描述 StatusText的可能值。

非使用中
暫止
停止中
假 離線
列印
紙張輸出
離線印表機
印表機錯誤
印表機已暫停
印表機閒置
InSession
就緒
已暫停
Unknown

PrintState
資料類型: 字串 存取類型:Read-Only

指出印表機狀態或任何印表機錯誤的印表機狀態。 下表描述 PrintState的可能值。

假 離線
列印
紙張輸出
離線印表機
印表機錯誤
印表機已暫停
印表機閒置
InSession
就緒
已暫停
Unknown

類型
資料類型: uint16 存取類型:Read-Only

列印會話的類型。 下表描述 Type的可能值。

描述
0 3270
1 APPC

方法

方法 Description
GetObject 擷取 實例。
EnumerateInstances 列舉 物件的所有實例。
ExecMethod 執行指定的方法。
啟動 啟動列印會話。
停止 停止列印會話。
暫停 暫停列印會話。
重新啟動 重新開機列印會話。
PA1Key 模擬按下 PA1Key。
PA2Key 模擬按下 PA2Key。
取消 取消列印會話。

如需 GetObjectEnumerateInstancesExecMethod的詳細資訊,請參閱 IWbemServices 介面

規格需求

平臺:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows 11和Windows 10

另請參閱

WmiSnaStatus WMI 提供者類別
系統管理和管理程式設計指南