google了半天,好像应该采用邮槽,可是我采用如下的代码却收不到消息
void testMailslot()
{
        HANDLE hMailslot;
hMailslot=CreateMailslot("\\\\.\\mailslot\\messngr", 0, MAILSLOT_WAIT_FOREVER,NULL); if(INVALID_HANDLE_VALUE==hMailslot)
{
int error = GetLastError(); MessageBox(NULL, NULL, "..", MB_ICONINFORMATION);
return;
}

char buf[100];
DWORD dwRead;
while (1)
{
if(!ReadFile(hMailslot,buf,100,&dwRead,NULL))
{
MessageBox(NULL, NULL, "failed", MB_ICONINFORMATION);
CloseHandle(hMailslot);
return;
}
//MessageBox(NULL, NULL, buf,MB_ICONINFORMATION);
printf("%s\n", buf);
} CloseHandle(hMailslot);
}请问为什么我的代码收不到消息?