IAudioSessionEvents::OnIconPathChanged method

The OnIconPathChanged method notifies the client that the display icon for the session has changed.

Syntax

HRESULT OnIconPathChanged(
  LPCWSTR NewIconPath,
  LPCGUID EventContext
);

Parameters

NewIconPath

The path for the new display icon for the session. This parameter points to a string that contains the path for the new icon. The string pointer remains valid only for the duration of the call.

EventContext

The event context value. This is the same value that the caller passed to IAudioSessionControl::SetIconPath in the call that changed the display icon for the session. For more information, see Remarks.

Return Value

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

Remarks

The session manager calls this method each time a call to the IAudioSessionControl::SetIconPath method changes the display icon for the session. The Sndvol program uses a session's display icon to label the volume slider for the session.

The EventContext parameter provides a means for a client to distinguish between a display-icon change that it initiated and one that some other client initiated. When calling the IAudioSessionControl::SetIconPath method, a client passes in an EventContext parameter value that its implementation of the OnIconPathChanged method can recognize.

For a code example that implements the methods in the IAudioSessionEvents interface, see Audio Session Events.

Requirements

   
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header audiopolicy.h

See Also

IAudioSessionControl::SetIconPath

IAudioSessionEvents Interface