30static const char szmspath[] =
"\\\\.\\mailslot\\wine_mailslot_test";
34 HANDLE hSlot, hSlot2, hWriter, hWriter2;
40 dwMax = dwNext = dwMsgCount =
dwTimeout = 0;
42 &dwMsgCount, &
dwTimeout ),
"getmailslotinfo succeeded\n");
52 "Created mailslot with invalid name\n");
54 "error should be ERROR_INVALID_NAME\n");
64 dwMax = dwNext = dwMsgCount =
dwTimeout = 0;
66 "getmailslotinfo failed\n");
67 ok( dwMax == ~0
U,
"dwMax incorrect\n");
69 ok( dwMsgCount == 0,
"dwMsgCount incorrect\n");
72 "getmailslotinfo failed\n");
83 ok(!
ret,
"ReadFile should fail\n");
90 ok(!
ret,
"ReadFile should fail\n");
98 ok( !
ret,
"slot read\n");
109 "error should be ERROR_SHARING_VIOLATION got %p / %u\n", hWriter,
GetLastError());
122 ok( !
ret,
"slot read\n");
134 "can read client\n");
138 "can't write client\n");
140 "can read client\n");
154 ok( !
ret,
"slot read\n");
206 dwMax = dwNext = dwMsgCount =
dwTimeout = 0;
208 "getmailslotinfo failed\n");
210 ok( dwMax == 0,
"dwMax incorrect\n");
211 ok( dwMsgCount == 0,
"dwMsgCount incorrect\n");
216 ok( !
ret,
"slot read\n");
225 dwNext = dwMsgCount = 0;
227 "getmailslotinfo failed\n");
228 ok( dwNext == 1,
"dwNext incorrect\n");
229 ok( dwMsgCount == 1,
"dwMsgCount incorrect\n");
236 dwNext = dwMsgCount = 0;
238 "getmailslotinfo failed\n");
239 ok( dwNext == 1,
"dwNext incorrect\n");
241 ok( dwMsgCount == 2,
"dwMsgCount incorrect\n");
248 dwNext = dwMsgCount = 0;
250 "getmailslotinfo failed\n");
251 ok( dwNext == 1,
"dwNext incorrect\n");
253 ok( dwMsgCount == 3,
"dwMsgCount incorrect %u\n", dwMsgCount);
262 "1st slot read failed\n");
263 ok(
count == 1,
"failed to get 1st message\n");
264 ok(
buffer[0] ==
'a',
"1st message wrong\n");
267 dwNext = dwMsgCount = 0;
269 "getmailslotinfo failed\n");
270 ok( dwNext == 2,
"dwNext incorrect\n");
272 ok( dwMsgCount == 2,
"dwMsgCount incorrect %u\n", dwMsgCount);
277 "2nd slot read failed\n");
278 ok(
count == 2,
"failed to get 2nd message\n");
279 ok( (
buffer[0] ==
'b' ) && (
buffer[1] ==
'c' ),
"2nd message wrong\n");
282 dwNext = dwMsgCount = 0;
284 "getmailslotinfo failed\n");
285 ok( dwNext == 0,
"dwNext incorrect %u\n", dwNext);
287 ok( dwMsgCount == 1,
"dwMsgCount incorrect %u\n", dwMsgCount);
293 "3rd slot read failed\n");
295 ok(
count == 0,
"failed to get 3rd message\n");
301 dwNext = dwMsgCount = 0;
303 "getmailslotinfo failed\n");
305 ok( dwMsgCount == 0,
"dwMsgCount incorrect\n");
309 ok( !
ret,
"3rd slot read succeeded\n");
#define ERROR_INVALID_PARAMETER
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
BOOL WINAPI GetMailslotInfo(IN HANDLE hMailslot, IN LPDWORD lpMaxMessageSize, IN LPDWORD lpNextSize, IN LPDWORD lpMessageCount, IN LPDWORD lpReadTimeout)
HANDLE WINAPI CreateMailslotA(IN LPCSTR lpName, IN DWORD nMaxMessageSize, IN DWORD lReadTimeout, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetTickCount(VOID)
GLuint GLuint GLsizei count
static const char szmspath[]
static int mailslot_test(void)
#define MAILSLOT_NO_MESSAGE
DWORD WINAPI GetLastError(void)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
#define ERROR_SEM_TIMEOUT
#define ERROR_SHARING_VIOLATION
#define ERROR_PATH_NOT_FOUND