Naughter Software Logo

CServerMailslot & CClientMailslot v1.15 MFC wrapper classes for Win32 Mailslots

These 2 classes provides a clean C++ interface to the little known but quite powerful Win32 IPC mechanism called mailslots. They are very similar to the more common "Named pipe" IPC mechanism. Unlike named pipes, mailslots use datagrams. A datagram is a small packet of information that the network sends along the wire. Like a radio or television broadcast, a datagram offers no confirmation of receipt; there is no way to guarantee that a datagram has been received.

Mailslots can broadcast messages within a domain. If several processes in a domain each create a mailslot using the same name, every message that is addressed to that mailslot and sent to the domain is received by the participating processes. Because one process can control both a server and client mailslot handle, applications can easily implement a simple message-passing facility within a domain.

Another advantage that mailslots have over named pipes is that the server mailslot (the mailslot which can read) can be created on Windows 9x. This is unlike named pipes which can only be created server side on Windows NT, 2000, XP, 2003, Vista & 2008.

 

The enclosed zip file contains the source code for the 2 classes and also includes a VC 2005 solution to build a demonstration program called WinNotify. People who have used the MS WinPopup utility will notice the "Striking similarity" between it and the demonstration program as shown below:

WinNotify screen capture

 

Copyright

 

Updates

V1.1 (26 July 1998)

V1.11 (10 August 1998)

11 August 1998

V1.11 (26 July 2003)

V1.12 (22 December 2006)

V1.13 (23 December 2006)

V1.14 (8 September 2007)

V1.15 (7 September 2008)