IPrinterScriptablePropertyBag::SetInt32 方法(printerextension.h)

写入整数属性。

语法

HRESULT SetInt32(
  [in] BSTR bstrName,
  [in] LONG nValue
);

参数

[in] bstrName

要设置的属性。

[in] nValue

要设置的新值。

返回值

此方法返回 HRESULT 值。

言论

如果找不到指定的属性,则调用 SetInt32 将引发异常。 建议对此方法的调用使用 try-catch 语句,以允许应用正常处理任何故障。

要求

要求 价值
最低支持的客户端 Windows 8
支持的最低服务器 Windows Server 2012
目标平台 桌面
标头 printerextension.h

另请参阅

IPrinterScriptablePropertyBag