IAudioSessionControl::GetGroupingParam method

The GetGroupingParam method retrieves the grouping parameter of the audio session.


HRESULT GetGroupingParam(
  [out] GUID *pRetVal


pRetVal [out]

Output pointer for the grouping-parameter GUID. This parameter must be a valid, non-NULL pointer to a caller-allocated GUID variable. The method writes the grouping parameter into this variable.

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 codeDescription

Parameter pRetVal is NULL.


The audio endpoint device has been unplugged, or the audio hardware or associated hardware resources have been reconfigured, disabled, removed, or otherwise made unavailable for use.


The Windows audio service is not running.



All of the audio sessions that have the same grouping parameter value are under the control of the same volume-level slider in the system volume-control program, Sndvol. For more information, see Grouping Parameters.

A client can call the IAudioSessionControl::SetGroupingParam method to change the grouping parameter of a session.

If a client has never called SetGroupingParam to assign a grouping parameter to an audio session, the session's grouping parameter value is GUID_NULL by default and a call to GetGroupingParam retrieves this value. A grouping parameter value of GUID_NULL indicates that the session does not belong to any grouping. In that case, the session has its own volume-level slider in the Sndvol program.


Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]



See also

IAudioSessionControl Interface