Samples

Several XInput samples are provided in the SDK. These samples are accessible using the sample browser.

SimpleController

This sample uses XInput and visually displays the state of each of the 4 controllers. Uses XInputGetState.

RumbleController

This sample shows how to set the rumble amount on each of the 4 controllers. Uses XInputGetState and XInputSetState.

AudioController

This sample uses XInput and DirectSound to read the headset microphone and play it back on the headset for each of the controllers. Uses XInputGetDSoundAudioDeviceGuids.

XInputGame

This sample shows how to combine Direct3D and XInput as well as how to handle unplugged controllers. Uses XInputGetState and XInputSetState.

See Also

Getting Started With XInput | XInput Functions