Esempio n. 1
0
 internal unsafe void __MarshalTo(ref __Native @ref)
 {
     @ref.Type    = Type;
     @ref.SubType = SubType;
     @ref.Flags   = Flags;
     @ref.Gamepad = Gamepad;
     Vibration.__MarshalTo(ref @ref.Vibration);
 }
Esempio n. 2
0
 /// <summary>
 /// <p>Sends data to a connected controller. This function is used to activate the vibration function of a controller.</p>
 /// </summary>
 /// <param name = "dwUserIndex"><dd> <p>Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.</p> </dd></param>
 /// <param name = "vibrationRef"><dd> <p>Pointer to an <strong><see cref = "SharpDX.XInput.Vibration"/></strong> structure containing the vibration information to send to the controller.</p> </dd></param>
 /// <returns><p>If the function succeeds, the return value is <strong>ERROR_SUCCESS</strong>.</p><p>If the controller is not connected, the return value is <strong>ERROR_DEVICE_NOT_CONNECTED</strong>.</p><p>If the function fails, the return value is an error code defined in WinError.h. The function does not use <em>SetLastError</em> to set the calling thread's last-error code.</p></returns>
 /// <doc-id>microsoft.directx_sdk.reference.xinputsetstate</doc-id>
 /// <unmanaged>DWORD XInputSetState([In] DWORD dwUserIndex,[In] XINPUT_VIBRATION* pVibration)</unmanaged>
 /// <unmanaged-short>XInputSetState</unmanaged-short>
 public static unsafe System.Int32 XInputSetState(System.Int32 dwUserIndex, ref SharpDX.XInput.Vibration vibrationRef)
 {
     SharpDX.XInput.Vibration.__Native vibrationRef_ = default(SharpDX.XInput.Vibration.__Native);
     System.Int32 __result__;
     vibrationRef.__MarshalTo(ref vibrationRef_);
     __result__ = XInputSetState_(dwUserIndex, &vibrationRef_);
     vibrationRef.__MarshalFree(ref vibrationRef_);
     return(__result__);
 }