Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CFile poczta(skrzynka);
- CString text;
- char wiad[1024]={'\0'};
- CString pararara[1024];
- int n;
- unsigned long messagesCount;
- GetMailslotInfo(skrzynka, NULL, NULL, &messagesCount, NULL);
- for (int i = 0; i < messagesCount; ++i) {
- poczta.Read(wiad, 1023);
- CString t;
- t.Format(_T("%s"), wiad);
- text += t;
- pararara[i] = t;
- text += _T("\r\n");
- }
- CString x = _T("\\\\.\\mailslot\\poczta\\pudzian");
- CFile p(x, CFile::modeWrite + CFile::shareDenyNone);
- for (int i = 0; i < messagesCount; ++i){
- p.Write(LPCSTR(pararara[i]), pararara[i].GetLength() + sizeof(TCHAR));
- }
- wyswietlO.SetWindowText(text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement