pankaj.talk
July 12th, 2007, 05:16 AM
Hi,
I am using CreateFileMapping & OpenFileMapping function to simulate name based shared memory in windows.
I am specifying lpAttributes as NULL in the call to CreateFileMapping. Now if the process A that executes CreateFileMapping runs under a different account than process B that executes OpenFileMapping, the Process B fails, giving an access denied error. That is Process B fails to attach to the file segment.
How do I fix this? I found that we can specify a security descriptor (second argument to CreateFileMapping) for a file mapping object when you call the CreateFileMapping function. But not sure how to do this
I am using CreateFileMapping & OpenFileMapping function to simulate name based shared memory in windows.
I am specifying lpAttributes as NULL in the call to CreateFileMapping. Now if the process A that executes CreateFileMapping runs under a different account than process B that executes OpenFileMapping, the Process B fails, giving an access denied error. That is Process B fails to attach to the file segment.
How do I fix this? I found that we can specify a security descriptor (second argument to CreateFileMapping) for a file mapping object when you call the CreateFileMapping function. But not sure how to do this