IMMNotificationClient::OnDeviceRemoved Method

The OnDeviceRemoved method indicates that an audio endpoint device has been removed.

Syntax

public:
HRESULT OnDeviceRemoved(
         LPCWSTR pwstrDeviceId
)  

Parameters

pwstrDeviceId
Type: LPCWSTR 

[in]

Pointer to the endpoint ID string that identifies the audio endpoint device. This parameter points to a null-terminated, wide-character string containing the endpoint ID. The string remains valid for the duration of the call.

Return value

Type: HRESULT 

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Refer to WASAPI error codes.

Remarks

For a code example that implements the OnDeviceRemoved method, see Device Events.

Requirements

Header: Declared in mmdeviceapi.h.

Library: Use MMDevApi.lib.

See also

IMMNotificationClient

IMMNotificationClient Members