The problem I am encountering is with the Mailslot write function of the client. The purpose of this is to build a compatible code base in C#, that will be used with older applications built in C++. The C# code client to server works fine, using either separate (local) applications or internal communication. I can also talk to the server spun up in C++ code. So, everything seems to be working...to a point.
But the thing is, I cannot write from the C++ client to the C# server. The code returned is 5, which is access denied.
This seems to be a security/permission problem with the C# code base. Any thoughts?
The basic ideas for the mailslot is this:
//Server - C# CreateMailslot(mailBoxPath, 1024, 2000, IntPtr.Zero); ReadFile(serverHandle, buffer, msgSize, out numBytesReadm Intptr.Zero); //Client - C++ CreatFile(mailBoxPath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL); WriteFile(clientHandle, mailMsg, numBytesToWrite, numBytesWritten, NULL);
Here is some information on the topic.