the definition and associated constants and structures for user32's SendInput are missing.
Original Reporter info from Mantis: 440bx @440bx
-
Reporter name:
Original Reporter info from Mantis: 440bx @440bx
- Reporter name:
Description:
the definition and associated constants and structures for user32's SendInput are missing.
The missing definitions are: (note: the names are very similar to those in MSDN but in most cases, not the same)
const
INPUT_MOUSE = 0;
INPUT_KEYBOARD = 1;
INPUT_HARDWARE = 2;
-----------------------------------
{ mouse input structure definition }
type
MOUSEINPUT = record
dx : long;
dy : long;
MouseData : DWORD;
Flags : DWORD;
Time : DWORD;
ExtraInfo : pointer;
end;
PMOUSEINPUT = ^MOUSEINPUT;
-----------------------------------
{ keyboard input structure definition }
type
KEYBDINPUT = record
Vk : word;
Scan : word;
Flags : DWORD;
Time : DWORD;
ExtraInfo : pointer;
end;
PKEYBDINPUT = ^KEYBDINPUT;
-----------------------------------
{ hardware input structure definition }
type
HARDWAREINPUT = record
Msg : DWORD;
wParamLo : word;
wParamHi : word;
end;
PHARDWAREINPUT = ^HARDWAREINPUT;
-----------------------------------
{ input structure }
type
TINPUT = record
InputType : DWORD;
case integer of
1 : (mi : MOUSEINPUT);
2 : (ki : KEYBDINPUT);
3 : (hi : HARDWAREINPUT);
end;
PINPUT = ^TINPUT;
----------------------------------------------------------------------------
{ function definition }
function SendInput(InputsCount : UINT; InputsPtr : PINPUT; Size : integer)
: UINT; stdcall; external user32;
(Note: the above definitions have been tested for mouse input only in both 32bit and 64bit.)
Steps to reproduce:
Attempt to compile a program that calls SendInput.
Additional information:
Tested to work correctly when used to alter mouse coordinates. Not tested for keyboard nor hardware events.
Mantis conversion info:
- Mantis ID: 35064
- OS: Windows
- OS Build: 2K and up
- Platform: Windows
- Version: 3.0.4
- Fixed in revision: 42994 (#3bae3a4a)