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 208 of file AttachThreadInput.c.
209{
212
213 for(
i = 0;
i< 4;
i++)
214 {
215 for(
j = 0;
j< 4;
j++)
216 {
218 ok(
ret==0,
"expected AttachThreadInput to fail\n");
219 }
220 }
221}
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
202
204
206}
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 657 of file AttachThreadInput.c.
658{
660 return;
661
670
675
676
681}
#define PostThreadMessage
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
◆ Test_Focus()
Definition at line 349 of file AttachThreadInput.c.
350{
352
354
358
361
362
363 {
365 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
367
370
372 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
373 }
374
377
381
384
385
386 {
388 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
390
393
395 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
396 }
397
398
402
405
406
407 {
409 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
411
414
418
421
423 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
424 }
425
428
432
435
436
437 {
439 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
441
444
448
451
453 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
454 }
455}
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HWND WINAPI SetActiveWindow(_In_ HWND)
Referenced by START_TEST().
◆ Test_SendInput()
Definition at line 536 of file AttachThreadInput.c.
537{
541 {0,0}};
545 {0,0}};
546
548
549
550
551
552 {
555
558
562
567
570 }
571
572
573 {
575 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
576
580
585
588 }
589
590
591 {
595
598
601
606
609
611 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
612 }
613
614
615 {
617 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
618
622
627
630 }
631
632
633 {
637
640
643
648
651
653 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
654 }
655}
#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 230 of file AttachThreadInput.c.
231{
233
234
235
237 ok(
ret==0,
"expected AttachThreadInput to fail\n");
238
239
241 ok(
ret==0,
"expected AttachThreadInput to fail\n");
242
243
245 ok(
ret==0,
"expected AttachThreadInput to fail\n");
248
249
251 ok(
ret==0,
"expected AttachThreadInput to fail\n");
254
255
256 {
257
259 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
260
261
263 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
264 }
265
266 {
267
269 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
270
271
273 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
274
275
277 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
278
279
281 ok(
ret==0,
"expected AttachThreadInput to fail\n");
282
283
285 ok(
ret==0,
"expected AttachThreadInput to fail\n");
286
287
289 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
290
292 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
293
295 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
296 }
297
298
299 {
301 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
303 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
304
305
307 ok(
ret==0,
"expected AttachThreadInput to fail\n");
309 ok(
ret==0,
"expected AttachThreadInput to fail\n");
310
311
313 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
314
316 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
317
318
320 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
322 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
323 }
324
325
326 {
328 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
330 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
332 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
334 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
335
337
339 ok(
ret==0,
"expected AttachThreadInput to fail\n");
341 ok(
ret==0,
"expected AttachThreadInput to fail\n");
342
343
345 }
346
347}
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
Referenced by START_TEST().
◆ Test_UnaffectedMessages()
void Test_UnaffectedMessages |
( |
| ) |
|
Definition at line 458 of file AttachThreadInput.c.
459{
462
465
466
467
470
471 {
475 {0,0}};
479 {0,0}};
480
482 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
483
486
489
492
494 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
495 }
496
497
502
503 {
507 {0,0}};
512 {0,0}};
513
515 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
516
521
522
525
528
530 ok(
ret==1,
"expected AttachThreadInput to succeed\n");
531 }
532
533
534}
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 |