IAudioSessionEvents::OnIconPathChanged method (audiopolicy.h)

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

Syntax

HRESULT OnIconPathChanged(
  [in] LPCWSTR NewIconPath,
  [in] LPCGUID EventContext
);

Parameters

[in] 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.

[in] 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

Requirement Value
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