• Advertisement

Archived

This topic is now archived and is closed to further replies.

Shared memory access rights

This topic is 5366 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, What I want to do is.. Share some memory between processes, but restrict write access to only one process. Im using CreateFileMapping to create the shared memory, but have no idea about security atributes etc :/ Is there any way to make it allow write/read access to the Creator of the File mapping and only read access to additional processes gaining access to it Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Look at the sample code in the MSDN article below, but instead of RegCreateKeyEx you would use CreateFileMapping.

http://msdn.microsoft.com/library/en-us/security/security/creating_a_security_descriptor_for_a_new_object.asp

Share this post


Link to post
Share on other sites
Thanks,

But that only assigns access based on user. What i need to do is allow all apps to only read some shared memory (except the process creating the shared memory, which can also write)

note: all apps are going to be the same user.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I don''t know if you can do it any other way. One way is to run your application under a specific user account and allow only that user to access the filemapping. Or to create a group and allow users from that group to access the file mapping.

You could try to ask in this group also: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&group=microsoft.public.win32.programmer.kernel

Share this post


Link to post
Share on other sites

  • Advertisement