Commit 9e19e3f8 authored by Jakob Eriksson's avatar Jakob Eriksson Committed by Alexandre Julliard

Prevent Windows 95 from blocking on linking issue.

parent df4409fb
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
HWND hWndTest; HWND hWndTest;
long timetag = 0x10000000; long timetag = 0x10000000;
static UINT (WINAPI *ptr_SendInput) (UINT, INPUT*, size_t);
#define MAXKEYEVENTS 6 #define MAXKEYEVENTS 6
#define MAXKEYMESSAGES MAXKEYEVENTS /* assuming a key event generates one #define MAXKEYMESSAGES MAXKEYEVENTS /* assuming a key event generates one
and only one message */ and only one message */
...@@ -203,12 +205,19 @@ int KbdMessage( KEV kev, WPARAM *pwParam, LPARAM *plParam ) ...@@ -203,12 +205,19 @@ int KbdMessage( KEV kev, WPARAM *pwParam, LPARAM *plParam )
*/ */
void do_test( HWND hwnd, int seqnr, KEV td[] ) void do_test( HWND hwnd, int seqnr, KEV td[] )
{ {
HMODULE module;
INPUT inputs[MAXKEYEVENTS]; INPUT inputs[MAXKEYEVENTS];
KMSG expmsg[MAXKEYEVENTS]; KMSG expmsg[MAXKEYEVENTS];
MSG msg; MSG msg;
char buf[100]; char buf[100];
UINT evtctr=0; UINT evtctr=0;
int kmctr, i; int kmctr, i;
module = GetModuleHandleA("user32");
if (!module) return;
ptr_SendInput = (void *)GetProcAddress(module, "SendInput");
if (!ptr_SendInput) return;
buf[0]='\0'; buf[0]='\0';
TrackSysKey=0; /* see input.c */ TrackSysKey=0; /* see input.c */
for( i = 0; i < MAXKEYEVENTS; i++) { for( i = 0; i < MAXKEYEVENTS; i++) {
...@@ -222,7 +231,7 @@ void do_test( HWND hwnd, int seqnr, KEV td[] ) ...@@ -222,7 +231,7 @@ void do_test( HWND hwnd, int seqnr, KEV td[] )
for( kmctr = 0; kmctr < MAXKEYEVENTS && expmsg[kmctr].message; kmctr++) for( kmctr = 0; kmctr < MAXKEYEVENTS && expmsg[kmctr].message; kmctr++)
; ;
assert( evtctr <= MAXKEYEVENTS ); assert( evtctr <= MAXKEYEVENTS );
assert( evtctr == SendInput(evtctr, &inputs[0], sizeof(INPUT))); assert( evtctr == ptr_SendInput(evtctr, &inputs[0], sizeof(INPUT)));
i = 0; i = 0;
trace("======== key stroke sequence #%d: %s =============\n", trace("======== key stroke sequence #%d: %s =============\n",
seqnr + 1, buf); seqnr + 1, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment