IAudioSessionEvents::OnIconPathChanged

Previous Next

IAudioSessionEvents::OnIconPathChanged

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

HRESULT OnIconPathChanged(
  LPWCHAR  NewIconPath,
  LPCGUID  EventContext
);

Parameters

NewIconPath

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

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

Client: Windows Vista

Header: Include Audiopolicy.h.

See Also

Previous Next