Move tests from rosapps to rostests

svn path=/trunk/; revision=26010
This commit is contained in:
Aleksey Bragin 2007-03-06 11:10:43 +00:00
parent 3e98dbd825
commit 2199ae9003
262 changed files with 362 additions and 6 deletions

View file

@ -0,0 +1,40 @@
#include <windows.h>
int main(int argc, char *argv[])
{
HANDLE hMailslot;
CHAR chBuf[512];
BOOL fResult;
DWORD cbRead;
LPTSTR lpszMailslotName = "\\\\.\\mailslot\\mymailslot";
hMailslot = CreateMailslot(lpszMailslotName,
512,
MAILSLOT_WAIT_FOREVER,
NULL);
for (;;)
{
fResult = ReadFile(hMailslot,
chBuf,
512,
&cbRead,
NULL);
if (fResult == FALSE)
{
printf("ReadFile() failed!\n");
CloseHandle(hMailslot);
return 0;
}
printf("Data read: %s\n", chBuf);
}
CloseHandle(hMailslot);
return 0;
}
/* EOF */