Szerkesztés

Megosztás a következőn keresztül:


IMMDevice interface (mmdeviceapi.h)

The IMMDevice interface encapsulates the generic features of a multimedia device resource. In the current implementation of the MMDevice API, the only type of device resource that an IMMDevice interface can represent is an audio endpoint device.

A client can obtain an IMMDevice interface from one of the following methods:

For more information, see IMMDeviceCollection Interface.

After obtaining the IMMDevice interface of an audio endpoint device, a client can obtain an interface that encapsulates the endpoint-specific features of the device by calling the IMMDevice::QueryInterface method with parameter iid set to REFIID IID_IMMEndpoint. For more information, see IMMEndpoint Interface.

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

Inheritance

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

Methods

The IMMDevice interface has these methods.

 
IMMDevice::Activate

The Activate method creates a COM object with the specified interface.
IMMDevice::GetId

The GetId method retrieves an endpoint ID string that identifies the audio endpoint device.
IMMDevice::GetState

The GetState method retrieves the current device state.
IMMDevice::OpenPropertyStore

The OpenPropertyStore method retrieves an interface to the device's property store.

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

IMMDeviceCollection Interface

IMMDeviceCollection::Item

IMMDeviceEnumerator::GetDefaultAudioEndpoint

IMMDeviceEnumerator::GetDevice

IMMEndpoint Interface

MMDevice API