General discussion

Locked

WinNT Messenger service & Winpop

By Normunds ·
WinNT Messenger service and Winpopup uses mailslot to comunicate on network, but I couldn't find any info covering format of msg they send. I suppose it should be smth like that: "Recipient"+#0+"Sender"+#0+"msg text", but maybe I'm wrong. And 1 morething - how to write to mailslot using some specific protocol, not all available on PC.
Thanx!
Normunds

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

WinNT Messenger service & Winpop

by karlww In reply to WinNT Messenger service & ...

The mailslot name is "messngr", the message format is;
"From\0To\0Message Body\0\0"

So in C (and in the 100 char space I have);
char* to_pc = "\\TO_PC\mailslot\messngr";
HANDLE hMailslot=CreateFile
(to_pc,
GENERIC_WRITE,
FILE_SHARE_READ, NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (hMailslot != ERROR_INVALID_HANDLE)
{
char* lpBuf = "ME\0YOU\0TEST\0\0";
DWORD dwWritten;
BOOL rc = WriteFile(hMailslot,
&lpBuf,
strlen(lpBuf),
&dwWritten,
NULL);
CloseHandle(hMailslot);
}

Collapse -

WinNT Messenger service & Winpop

by Normunds In reply to WinNT Messenger service & ...

:) Thank you, this information helped me a lot.

Collapse -

WinNT Messenger service & Winpop

by Normunds In reply to WinNT Messenger service & ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Software Forums