#include <windows.h>
#include <stdio.h>
#include <assert.h>
Go to the source code of this file.
◆ main()
Definition at line 57 of file thread_msg.c.
58{
60
61 printf(
"Creating events\n" );
62
66
67 printf(
"Created events\n" );
68
70 printf(
"Couldn't create one thread.\n" );
71 return 0;
72 }
73
74 printf(
"Posting to non-existent queue\n" );
75
76
78
79 printf(
"Signalling thread to advance.\n" );
80
82
83 printf(
"Waiting for signal from thread.\n" );
85
86 printf(
"Sending three messages, then quit.\n" );
92
94 printf(
"Test complete.\n" );
95
96 return 0;
97}
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)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HANDLE hOkToPostThreadMessage
#define PostThreadMessage
◆ thread()
Definition at line 20 of file thread_msg.c.
21{
23
24
25
26 printf(
"Waiting to create the message queue.\n" );
27
29
30 printf(
"Creating message queue.\n" );
31
32
34
35 printf(
"Signalling the parent that we're ready.\n" );
36
37
39
40 printf(
"Listening messages.\n" );
41
42
44 printf(
"Received message: %04x %04x %08lx\n",
45 (
msg.message & 0xffff),
46 (
msg.wParam & 0xffff),
49 }
50
51 printf(
"Finished receiving messages.\n" );
53
54 return 0;
55}
TW_UINT32 TW_UINT16 TW_UINT16 MSG
◆ hOkToPostThreadMessage
◆ hOkToTerminate
◆ hWaitForFailure
Test case for PostThreadMessage (C) 2003 ReactOS License: LGPL See: LGPL.txt in top directory. Author: arty
Windows thread message queue test case. Derived from ../event/event.c in part.
Definition at line 16 of file thread_msg.c.
Referenced by main(), and thread().