PropKeyFindKeySetPropVariant function (sensorsutils.h)

This routine finds and sets the PROPVARIANT within a collection list based on the PROPERTYKEY.

Syntax

NTSTATUS PropKeyFindKeySetPropVariant(
  [in] SENSOR_COLLECTION_LIST *pList,
  [in] const PROPERTYKEY      *pKey,
  [in] BOOLEAN                TypeCheck,
  [in] PROPVARIANT            *pValue
);

Parameters

[in] pList

Pointer to the list of PROPVARIANT collection.

[in] pKey

Pointer to a PROPERTYKEY for the target PROPVARIANT.

[in] TypeCheck

If TRUE, the function validates whether a pValue type matches one of the value types found in pList.

[in] pValue

Pointer to the target PROPVARIANT.

Return value

This function returns one of the following NTSTATUS codes:

  • STATUS_INVALID_PARAMETER if pList, pKey or, pValue is nullptr.
  • STATUS_NOT_FOUND if the element associated with the propertyKey was not found.
  • STATUS_SUCCESS on success.

Requirements

Requirement Value
Header sensorsutils.h