public static unsafe ErrorCode XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke pKeystroke) { pKeystroke = new Keystroke(); try { return(GetMethod <XInputGetKeystrokeDelegate>("XInputGetKeystroke")(dwUserIndex, dwReserved, out pKeystroke)); } catch (AccessViolationException ex) { throw new Exception(ex.Message); } catch (Exception) { throw; } }
/// <summary> /// Gets the keystroke. /// </summary> /// <param name="deviceQueryType">The flag.</param> /// <param name="keystroke">The keystroke.</param> /// <returns></returns> /// <unmanaged>unsigned int XInputGetKeystroke([In] XUSER_INDEX dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke)</unmanaged> public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke) { var result = ErrorCodeHelper.ToResult(XInput.XInputGetKeystroke((int)userIndex, (int)deviceQueryType, out keystroke)); result.CheckError(); return(result); }
public static unsafe int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef) { keystrokeRef = new Keystroke(); int keystroke; fixed (Keystroke* keystrokePtr = &keystrokeRef) keystroke = XInput.XInputGetKeystroke_(dwUserIndex, dwReserved, (void*) keystrokePtr); return keystroke; }
public static unsafe int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef) { keystrokeRef = new Keystroke(); int keystroke; fixed(Keystroke *keystrokePtr = &keystrokeRef) keystroke = XInput.XInputGetKeystroke_(dwUserIndex, dwReserved, (void *)keystrokePtr); return(keystroke); }
/// <summary>Gets the keystroke.</summary> /// <param name="deviceQueryType">The flag.</param> /// <param name="keystroke">The keystroke.</param> /// <returns></returns> /// <unmanaged>unsigned int XInputGetKeystroke([In] XUSER_INDEX dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke)</unmanaged> public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke) { return(ErrorCodeHelper.ToResult(xinput.XInputGetKeystroke((int)this.userIndex, (int)deviceQueryType, out keystroke))); }
public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke) { Result result = ErrorCodeHelper.ToResult(XInput.XInputGetKeystroke((int) this.userIndex, (int) deviceQueryType, out keystroke)); result.CheckError(); return result; }
public int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef) { return(XInput.XInputGetKeystroke(dwUserIndex, dwReserved, out keystrokeRef)); }
uint XInputGetKeystroke_Hooked(int dwUserIndex, int dwReserved, out Keystroke pKeystroke) { pKeystroke = new Keystroke(); var controller = new Controller((UserIndex)dwUserIndex); if (controller.IsConnected) { try { var result = controller.GetKeystroke(DeviceQueryType.Any, out pKeystroke); return (uint) result.Code; } catch { return ERROR_DEVICE_NOT_CONNECTED; } } else { pKeystroke.UserIndex = UserIndex.One; } return ERROR_SUCCESS; }
public int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef) { throw new NotSupportedException("Method not supported on XInput9.1.0"); }
public static extern int XInputGetKeystroke( int dwUserIndex, int dwReserved, out Keystroke keystrokeRef);
public int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef) { return XInput.XInputGetKeystroke(dwUserIndex, dwReserved, out keystrokeRef); }
public static extern int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef);
/// <summary> /// Gets the keystroke. /// </summary> /// <param name="deviceQueryType">The flag.</param> /// <param name="keystroke">The keystroke.</param> /// <returns></returns> /// <unmanaged>unsigned int XInputGetKeystroke([In] XUSER_INDEX dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke)</unmanaged> public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke) { var result = ErrorCodeHelper.ToResult(xinput.XInputGetKeystroke((int)userIndex, (int)deviceQueryType, out keystroke)); return result; }