IAudioSessionManager2::UnregisterSessionNotification method (audiopolicy.h)

The UnregisterSessionNotification method deletes the registration to receive a notification when a session is created.

Syntax

HRESULT UnregisterSessionNotification(
  IAudioSessionNotification *SessionNotification
);

Parameters

SessionNotification

A pointer to the application's implementation of the IAudioSessionNotification interface. Pass the same interface pointer that was specified to the session manager in a previous call to IAudioSessionManager2::RegisterSessionNotification to register for notification.

If the UnregisterSessionNotification method succeeds, it calls the Release method on the application's IAudioSessionNotification interface.

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return value Description
E_POINTER
SessionNotification is NULL.

Remarks

The application calls this method when it no longer needs to receive notifications. The UnregisterSessionNotification method removes the registration of an IAudioSessionNotification interface that the application previously registered with the session manager by calling the IAudioSessionControl::RegisterAudioSessionNotification method.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header audiopolicy.h

See also

IAudioSessionManager2