0

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?

Community
  • 1
  • 1
zmau
  • 9
  • 4

1 Answers1

0

There was another thread How to share memory between services and user processes which may help to resolve your problem. I played around with this, and using ACE

D:(A;;GR;;;AU)(A;;GA;;;LS)

ended up in that users can only READ from the shared memory.

Community
  • 1
  • 1
Willy K.
  • 397
  • 2
  • 14