IPrinterScriptablePropertyBag::SetBytes 方法 (printerextension.h)

寫入位元組數位屬性。

語法

HRESULT SetBytes(
  [in] BSTR      bstrName,
       IDispatch *pArray
);

參數

[in] bstrName

要寫入的陣列。

pArray

要寫入的 JavaScript 陣列。

傳回值

這個方法會傳回 HRESULT 值。

備註

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

規格需求

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

另請參閱

IPrinterScriptablePropertyBag