The IMMNotificationClient interface provides notifications when an audio endpoint devices is added or removed, when the state or properties of an endpoint device change, or when there is a change in the default role assigned to an endpoint device. Unlike the other interfaces in this section, which are implemented by the MMDevice API system component, an MMDevice API client implements the IMMNotificationClient interface. To receive notifications, the client passes a pointer to its IMMNotificationClient interface instance as a parameter to the IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
After registering its IMMNotificationClient interface, the client receives event notifications in the form of callbacks through the methods of the interface.
Each method in the IMMNotificationClient interface receives, as one of its input parameters, an endpoint ID string that identifies the audio endpoint device that is the subject of the notification. The string uniquely identifies the device with respect to all of the other audio endpoint devices in the system. The methods in the IMMNotificationClient interface implementation should treat this string as opaque. That is, none of the methods should attempt to parse the contents of the string to obtain information about the device. The reason is that the string format is undefined and might change from one implementation of the MMDevice API system module to the next.
A client can use the endpoint ID string that it receives as an input parameter in a call to an IMMNotificationClient method in two ways:
In implementing the IMMNotificationClient interface, the client should observe these rules to avoid deadlocks and undefined behavior:
For a code example that implements the IMMNotificationClient interface, see Device Events.
interface IMMNotificationClient : public IUnknown
Header: Declared in mmdeviceapi.h.
Library: Use MMDevApi.lib.