Partager via


IMMDeviceEnumerator Interface

Previous Next

IMMDeviceEnumerator Interface

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:

IMMDeviceEnumerator inherits from the IUnknown interface. In addition to the methods inherited from IUnknown, IMMDeviceEnumerator supports the following methods.

Method Description
EnumAudioEndpoints Generates a collection of audio endpoint devices that meet the specified criteria.
GetDefaultAudioEndpoint Retrieves the default audio endpoint for the specified data-flow direction and role.
GetDevice Retrieves an endpoint device that is specified by an endpoint device-identification string.
RegisterEndpointNotificationCallback Registers a client's notification callback interface.
UnregisterEndpointNotificationCallback Deletes the registration of a notification interface that the client registered in a previous call to the IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.

Requirements

Client: Windows Vista

Header: Include Mmdeviceapi.h.

See Also

Previous Next