IActivateAudioInterfaceAsyncOperation::GetActivateResult Method

Gets the results of an asynchronous activation of a WASAPI interface initiated by an application calling the ActivateAudioInterfaceAsync function.

Syntax

public:
HRESULT GetActivateResult(
         HRESULT *activateResult,
         IUnknown **activatedInterface
)  

Parameters

activateResult
Type: HRESULT *

[out] A success or error code (E_ILLEGAL_METHOD_CALL will be returned if the method was called before the asynchronous operation was complete).

activatedInterface
Type: IUnknown **

[out] Pointer to a pointer to the activated interface.

Return value

Type: HRESULT 

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
E_ILLEGAL_METHOD_CALL The method was called before the asynchronous operation was complete.

Also refer to WASAPI error codes.

Remarks

An application calls this method after Windows calls the ActivateCompleted method of the application’s IActivateAudioInterfaceCompletionHandler interface.

The result code returned through activateResult may depend on the requested interface. For additional information, see IMMDevice::Activate. A result code of E_ACCESSDENIED might indicate that the user has not given consent to access the device in a manner required by the requested WASAPI interface.

The returned activatedInterface may be NULL if activateResult is not a success code.

Requirements

Header: Declared in mmdeviceapi.h.

Library: Use MMDevApi.lib.

See also

IActivateAudioInterfaceAsyncOperation

IActivateAudioInterfaceAsyncOperation Members