IMMDeviceEnumerator interface (mmdeviceapi.h)

The IMMDeviceEnumerator interface provides methods for enumerating multimedia device resources. In the current implementation of the MMDevice API, the only device resources that this interface can enumerate are audio endpoint devices. A client obtains a reference to an IMMDeviceEnumerator interface by calling the CoCreateInstance function, as described previously (see MMDevice API).

The device resources enumerated by the methods in the IMMDeviceEnumerator interface are represented as collections of objects with IMMDevice interfaces. A collection has an IMMDeviceCollection interface. The IMMDeviceEnumerator::EnumAudioEndpoints method creates a device collection.

To obtain a pointer to the IMMDevice interface of an item in a device collection, the client calls the IMMDeviceCollection::Item method.

For code examples that use the IMMDeviceEnumerator interface, see the following topics:

Inheritance

The IMMDeviceEnumerator interface inherits from the IUnknown interface. IMMDeviceEnumerator also has these types of members:

Methods

The IMMDeviceEnumerator interface has these methods.

 
IMMDeviceEnumerator::EnumAudioEndpoints

The EnumAudioEndpoints method generates a collection of audio endpoint devices that meet the specified criteria.
IMMDeviceEnumerator::GetDefaultAudioEndpoint

The GetDefaultAudioEndpoint method retrieves the default audio endpoint for the specified data-flow direction and role.
IMMDeviceEnumerator::GetDevice

The GetDevice method retrieves an audio endpoint device that is identified by an endpoint ID string.
IMMDeviceEnumerator::RegisterEndpointNotificationCallback

The RegisterEndpointNotificationCallback method registers a client's notification callback interface.
IMMDeviceEnumerator::UnregisterEndpointNotificationCallback

The UnregisterEndpointNotificationCallback method deletes the registration of a notification interface that the client registered in a previous call to the IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mmdeviceapi.h

See also

Core Audio Interfaces

IMMDevice Interface

IMMDeviceCollection Interface

IMMDeviceCollection::Item

IMMDeviceEnumerator::EnumAudioEndpoints

MMDevice API