IKsPropertySet::Set 方法(ksproxy.h)

Set 方法设置由属性集 GUID 和属性标识符标识的属性。

语法

HRESULT Set(
  [in] REFGUID PropSet,
  [in] ULONG   Id,
  [in] LPVOID  InstanceData,
  [in] ULONG   InstanceLength,
  [in] LPVOID  PropertyData,
  [in] ULONG   DataLength
);

参数

[in] PropSet

标识属性集的 GUID。

[in] Id

属性集中属性的标识符。

[in] InstanceData

指向属性的实例数据的指针。

[in] InstanceLength

InstanceData的缓冲区的大小(以字节为单位)。

[in] PropertyData

指向包含要设置的属性值的缓冲区的指针。

[in] DataLength

PropertyData处缓冲区的大小(以字节为单位)。

返回值

如果成功,则返回 NOERROR;否则,返回错误代码。

言论

警告

头文件 ksproxy.hdsound.h 定义 IKsPropertySet 接口的类似但不兼容的版本。 需要 KS 代理模块的应用程序应使用 ksproxy.h中定义的版本。 如果应用程序必须同时包含 ksproxy.hdsound.h,则编译器首先扫描的头文件是编译器使用 IKsPropertySet 的定义。

要求

要求 价值
目标平台 桌面
标头 ksproxy.h (包括 Ksproxy.h、Dsound.h)

另请参阅

IKsPropertySet::Get