IWbemPathKeyList::SetKey2 method

The IWbemPathKeyList::SetKey2 method sets the name or value pair for a key using variants. If the key exists, it is replaced.

Syntax


HRESULT SetKey2(
  [in]  LPCWSTR wszName,
  [in]  ULONG uFlags,
  [in]  ULONG uCimType,
  [in]  VARIANT *pKeyVal
);

Parameters

wszName [in]

Key name, may be NULL.

uFlags [in]

Reserved. Must be 0 (zero).

uCimType [in]

CIMTYPE size.

pKeyVal [in]

Pointer to a variant that contains the data.

Return value

This method returns an HRESULT indicating the status of the method call.

Return codeDescription
S_OK

Method executed successfully.

WBEM_E_INVALID_PARAMETER

One of five conditions:

  • The uFlags parameter is not 0 (zero).
  • The wszName parameter is NULL.
  • The uCimType parameter is not valid.
  • The pKeyVal parameter is NULL.
  • The variant data is not valid.
WBEM_E_OUT_OF_MEMORY

Insufficient memory to perform the operation.

 

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wmiutils.h

Library

Wbemuuid.lib

DLL

Wmiutils.dll

See also

IWbemPath
IWbemPathKeyList

 

 

Show:
© 2014 Microsoft