I am implementing inter process communication using Boost Interprocess. As a test I took the example from the boost documentation.
The first process (which creates the message queue) starts the other (which should receive the messages from the queue) using CreateProcess(NULL, (LPSTR)commandStream.str().c_str(), NULL, NULL, FALSE, NULL, NULL, NULL, &si, &pi)
The first process creates the queue using message_queue mq(create_only, "message_queue", 100, sizeof(int)).
Unfortunately, message_queue mq(open_only, "message_queue") throws an interprocess_exception. The exception contains the description Das System kann die angegebene Datei nicht finden. (The system can't find the requested file).
When the queue's creation and opening is both done in one single process, no exception is thrown and the communication works as described in the documentation.
Does someone know what could cause the exception and how I can solve it?
Edit: I am using Boost 1.45