Partager via


ActivateAudioInterface

July 21, 2014

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 only

Finds an audio endpoint based on the device ID and returns an IAudioClient interface.

HRESULT ActivateAudioInterface(
PCWSTR deviceId
REFIID iid
(void**) ppInterface
);

Parameters

  • deviceId
    [in] The device ID of the audio endpoint for which an interface is being requested. Obtain the device ID by calling GetDefaultAudioRenderId or GetDefaultAudioCaptureId.

  • REFIID
    [in] The IID of the requested interface. This value must be IID_IAudioClient or IID_IAudioClient2.

  • ppInterface
    [out] A pointer to the interface obtained by the method

Return Value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is similar to the IMMDevice::Activate method on the desktop.

Requirements

Minimum supported phone

Windows Phone 8

Header

phoneaudioclient.h

Static library

Phoneaudioses.lib

Runtime library

Phoneaudioses.dll