Sends data to a connected controller. This function is used to activate the vibration function of a controller.
DWORD XInputSetState( DWORD dwUserIndex, XINPUT_VIBRATION* pVibration );
If the function succeeds, the return value is ERROR_SUCCESS.
If the controller is not connected, the return value is ERROR_DEVICE_NOT_CONNECTED.
If the function fails, the return value is an error code defined in Winerror.h. The function does not use SetLastError to set the calling thread's last-error code.
Header: Declared in XInput.h.
Import Library: Use Xinput.lib.