wmiutils.) h (wmiutils.h 的 IWbemPathKeyList::SetKey 方法

IWbemPathKeyList::SetKey 方法會設定索引鍵的名稱或值組。 如果索引鍵存在,則會加以取代。 如果名稱是空的,則會刪除所有現有的索引鍵。

語法

HRESULT SetKey(
  [in] LPCWSTR wszName,
  [in] ULONG   uFlags,
  [in] ULONG   uCimType,
  [in] LPVOID  pKeyVal
);

參數

[in] wszName

機碼名稱可以是 NULL

[in] uFlags

保留的。 必須是 0 (零) 。

[in] uCimType

CIMTYPE 大小。

[in] pKeyVal

數據的指標。 指向的數據會根據 uCimType 參數而有所不同。

傳回值

這個方法會傳回 HRESULT ,指出方法呼叫的狀態。

規格需求

需求
最低支援的用戶端 Windows Vista
最低支援的伺服器 Windows Server 2008
目標平台 Windows
標頭 wmiutils.h
程式庫 Wbemuuid.lib
Dll Wmiutils.dll

另請參閱

IWbemPath

IWbemPathKeyList

IWbemPathKeyList::SetKey2