Go to the source code of this file.
◆ EXPECT_ACTIVE
Value:
"Expected hwnd%d to be active, got hwnd%d\n", \
HWND WINAPI GetActiveWindow(void)
Definition at line 31 of file AttachThreadInput.c.
◆ EXPECT_FOREGROUND
Value:
"Expected hwnd%d at the foreground, got hwnd%d\n", \
HWND WINAPI GetForegroundWindow(void)
Definition at line 27 of file AttachThreadInput.c.
◆ cleanup_attachments()
static void cleanup_attachments |
( |
| ) |
|
|
static |
Definition at line 205 of file AttachThreadInput.c.
206{
209
210 for(
i = 0;
i< 4;
i++)
211 {
212 for(
j = 0;
j< 4;
j++)
213 {
215 ok(
ret==0,
"expected AttachThreadInput to fail\n");
216 }
217 }
218}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
BOOL WINAPI AttachThreadInput(_In_ DWORD, _In_ DWORD, _In_ BOOL)
Referenced by START_TEST().
◆ CreateTestThread()
Definition at line 117 of file AttachThreadInput.c.
118{
120
128 {
129fail:
130 win_skip(
"child thread failed to initialize\n");
132 }
134}
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Referenced by InitThreads(), and Test_SimpleParameters().
◆ FlushMessages()
static void FlushMessages |
( |
| ) |
|
|
static |
◆ get_iwnd()
◆ InitThreads()
Definition at line 162 of file AttachThreadInput.c.
163{
164
165
167 {
172 }
173
174
176
178
180
181
185 {
188 }
189
190
192
193
195
196
198
199
201
203}
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
#define WS_OVERLAPPEDWINDOW
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
DWORD WINAPI GetCurrentThreadId(void)
BOOL WINAPI IsDebuggerPresent(void)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Referenced by START_TEST().
◆ KbdLLHookProc()
Definition at line 149 of file AttachThreadInput.c.
150{
153
155
158
160}
GLenum const GLfloat * params
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
Referenced by InitThreads().
◆ MouseLLHookProc()
◆ START_TEST()
Definition at line 654 of file AttachThreadInput.c.
655{
657 return;
658
667
672
673
678}
#define PostThreadMessage
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
◆ Test_Focus()
Definition at line 346 of file AttachThreadInput.c.
347{
349
351
355
358
359
360 {
362 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
364
367
369 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
370 }
371
374
378
381
382
383 {
385 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
387
390
392 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
393 }
394
395
399
402
403
404 {
406 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
408
411
415
418
420 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
421 }
422
425
429
432
433
434 {
436 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
438
441
445
448
450 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
451 }
452}
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HWND WINAPI SetActiveWindow(_In_ HWND)
Referenced by START_TEST().
◆ Test_SendInput()
Definition at line 533 of file AttachThreadInput.c.
534{
538 {0,0}};
542 {0,0}};
543
545
546
547
548
549 {
552
555
559
564
567 }
568
569
570 {
572 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
573
577
582
585 }
586
587
588 {
592
595
598
603
606
608 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
609 }
610
611
612 {
614 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
615
619
624
627 }
628
629
630 {
634
637
640
645
648
650 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
651 }
652}
#define COMPARE_CACHE_(cache, msg_chain)
#define EMPTY_CACHE_(cache)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
Referenced by START_TEST().
◆ Test_SimpleParameters()
void Test_SimpleParameters |
( |
| ) |
|
Definition at line 227 of file AttachThreadInput.c.
228{
230
231
232
234 ok(
ret==0,
"expected AttachThreadInput to fail\n");
235
236
238 ok(
ret==0,
"expected AttachThreadInput to fail\n");
239
240
242 ok(
ret==0,
"expected AttachThreadInput to fail\n");
245
246
248 ok(
ret==0,
"expected AttachThreadInput to fail\n");
251
252
253 {
254
256 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
257
258
260 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
261 }
262
263 {
264
266 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
267
268
270 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
271
272
274 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
275
276
278 ok(
ret==0,
"expected AttachThreadInput to fail\n");
279
280
282 ok(
ret==0,
"expected AttachThreadInput to fail\n");
283
284
286 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
287
289 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
290
292 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
293 }
294
295
296 {
298 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
300 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
301
302
304 ok(
ret==0,
"expected AttachThreadInput to fail\n");
306 ok(
ret==0,
"expected AttachThreadInput to fail\n");
307
308
310 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
311
313 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
314
315
317 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
319 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
320 }
321
322
323 {
325 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
327 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
329 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
331 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
332
334
336 ok(
ret==0,
"expected AttachThreadInput to fail\n");
338 ok(
ret==0,
"expected AttachThreadInput to fail\n");
339
340
342 }
343
344}
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
Referenced by START_TEST().
◆ Test_UnaffectedMessages()
void Test_UnaffectedMessages |
( |
| ) |
|
Definition at line 455 of file AttachThreadInput.c.
456{
459
462
463
464
467
468 {
472 {0,0}};
476 {0,0}};
477
479 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
480
483
486
489
491 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
492 }
493
494
499
500 {
504 {0,0}};
509 {0,0}};
510
512 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
513
518
519
522
525
527 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
528 }
529
530
531}
Referenced by START_TEST().
◆ TestProc()
◆ thread_proc()
Definition at line 83 of file AttachThreadInput.c.
84{
88 int iwnd;
89
91 {
94 }
95
96
100
102
103
105 {
109 }
110
111 if(hdesk)
113
114 return 0;
115}
#define DESKTOP_ALL_ACCESS
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
BOOL WINAPI CloseDesktop(_In_ HDESK)
Referenced by CreateTestThread().
◆ data
◆ hKbdHookLL
◆ hMouseHookLL
HHOOK hMouseHookLL = NULL |
|
static |