Article ID: 131493
Article Last Modified on 11/21/2006
If CreateFile opens the client end of a mailslot, the function always returns a valid handle, even if the mailslot does not exist. In other words, there is no relationship between opening the client end and opening the server end of the mailslot.
CreateFile("\\\\.\\mailslot\\testslot",
GENERIC_WRITE,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
GetLastError() in this case returns Error 2: "The system cannot find the
specified file."
Keywords: kbapi kbdocerr kbipc kbmailslot kbnetwork KB131493