共用方式為


IPrinterScriptablePropertyBag::GetInt32 方法(printerextension.h)

取得整數屬性。

語法

HRESULT GetInt32(
  [in]          BSTR bstrName,
  [out, retval] LONG *pnValue
);

參數

[in] bstrName

要讀取的屬性。

[out, retval] pnValue

讀取的值。

傳回值

這個方法會傳回 HRESULT 值。

言論

如果找不到指定的屬性,GetInt32 呼叫將會擲回例外狀況。 建議您在呼叫此方法時使用 try-catch 語句,以允許您的應用程式正常處理任何失敗。

要求

要求 價值
最低支援的用戶端 Windows 8
支援的最低伺服器 Windows Server 2012
目標平臺 桌面
標頭 printerextension.h

另請參閱

IPrinterScriptablePropertyBag