I using the following example to use shared memory Creating Named Shared Memory (This is Microsoft's example).
Generally, it works just fine. My problem starts if the "first program" is a child process of w Windows Service and the "second program" is a normal user program. In this case "second program" gets an "Access denied" error while calling OpenFileMapping().
So, I understand that I have to work with the "security descriptor", and allow all users to share this memory. Does anyone have a clue as to how this should be done ? I did not find any code example for this.
I saw another discussion regarding this issue he Sharing memory between two processes (C, Windows), but that was more simple.
Any advice?