Share via


IMMNotificationClient::OnPropertyValueChanged

Previous Next

IMMNotificationClient::OnPropertyValueChanged

The OnPropertyValueChanged method indicates that the value of a property belonging to an audio endpoint device has changed.

HRESULT OnPropertyValueChanged(
  LPCWSTR  pwstrDeviceId,
  const PROPERTYKEY  key
);

Parameters

pwstrDeviceId

[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

[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.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

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.

Requirements

Client: Windows Vista

Header: Include Mmdeviceapi.h.

See Also

Previous Next