XInputGetDSoundAudioDeviceGuids

Retrieves the sound rendering and sound capture device GUIDs that are associated with the headset connected to the specified controller.

DWORD XInputGetDSoundAudioDeviceGuids(
  DWORD dwUserIndex,
  GUID* pDSoundRenderGuid,
  GUID* pDSoundCaptureGuid
);

Parameters

dwUserIndex
[in] Index of the user's controller. Can be a value in the range 0–3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.
pDSoundRenderGuid
[out] Pointer that receives the GUID of the headset sound rendering device.
pDSoundCaptureGuid
[out] Pointer that receives the GUID of the headset sound capture device.

Return Values

If the function successfully retrieves the device IDs for render and capture, the return code is ERROR_SUCCESS.

If there is no headset connected to the controller, the function will also retrieve ERROR_SUCCESS with GUID_NULL as the values for pDSoundRenderGuid and pDSoundCaptureGuid.

If the controller port device is not physically connected, the function will return ERROR_DEVICE_NOT_CONNECTED.

If the function fails, it will return a valid Win32 error code.

Requirements

Header: Declared in XInput.h.

Import Library: Use Xinput.lib.

See Also

XInput Functions | XInputGetState