KeyValueCompareAndSet method of the Win32_RDSHCollection class

Compares the specified key in the collection with a comparand; if they match, the key is set to a new value. If the key does not exist, the method will insert the key into the collection.

Syntax

uint32 KeyValueCompareAndSet(
  [in]  string Key,
  [in]  string NewValue,
  [in]  string Comparand,
  [out] string InitialValue
);

Parameters

Key [in]

The key to compare.

NewValue [in]

The new value.

Comparand [in]

The string to compare the key to.

InitialValue [out]

On success or failure, contains the initial value of the key.

Remarks

Note that this method can retrieve the value of the key, and as such encapsulates the functionality of KeyValueGet.

Requirements

Requirement Value
Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\cimv2\rdms
MOF
RDManagement.mof
DLL
RDMS.dll

See also

Win32_RDSHCollection