Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. CFile poczta(skrzynka);
  2. CString text;
  3. char wiad[1024]={'\0'};
  4. CString pararara[1024];
  5. int n;
  6.  
  7. unsigned long messagesCount;
  8. GetMailslotInfo(skrzynka, NULL, NULL, &messagesCount, NULL);
  9.  
  10. for (int i = 0; i < messagesCount; ++i) {
  11. poczta.Read(wiad, 1023);
  12. CString t;
  13. t.Format(_T("%s"), wiad);
  14. text += t;
  15. pararara[i] = t;
  16. text += _T("\r\n");
  17. }
  18.  
  19. CString x = _T("\\\\.\\mailslot\\poczta\\pudzian");
  20. CFile p(x, CFile::modeWrite + CFile::shareDenyNone);
  21.  
  22. for (int i = 0; i < messagesCount; ++i){
  23. p.Write(LPCSTR(pararara[i]), pararara[i].GetLength() + sizeof(TCHAR));
  24. }
  25.  
  26. wyswietlO.SetWindowText(text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement