The OnPropertyValueChanged method indicates that the value of a property belonging to an audio endpoint device has changed.
public:
HRESULT OnPropertyValueChanged(
LPCWSTR pwstrDeviceId,
const PROPERTYKEY key
)
pwstrDeviceId
Type: LPCWSTR
[in]
Pointer to the endpoint ID string that identifies the audio endpoint device. This parameter points to a null-terminated, wide-character string that contains the endpoint ID. The string remains valid for the duration of the call.
key
Type: PROPERTYKEY
[in]
A PROPERTYKEY structure that specifies the property. The structure contains the property-set GUID and an index identifying a property within the set. The structure is passed by value. It remains valid for the duration of the call. For more information about PROPERTYKEY, see the Windows SDK documentation.
Type: HRESULT
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Refer to WASAPI error codes.
A call to the IPropertyStore::SetValue method that successfully changes the value of a property of an audio endpoint device generates a call to OnPropertyValueChanged. For more information about IPropertyStore::SetValue, see the Windows SDK documentation.
A client can use the key parameter to retrieve the new property value. For a code example that uses a property key to retrieve a property value from the property store of an endpoint device, see Device Properties.
For a code example that implements the OnPropertyValueChanged method, see Device Events.
Header: Declared in mmdeviceapi.h.
Library: Use MMDevApi.lib.