Dear All,
There is my question,
I want to write a file mapping by another process, It is created by CreateFileMapping with PAGE_READWRITE and a specify SECURITY_ATTRIBUTES.
The SECURITY_ATTRIBUTES is created by the follow function:
InitializeSecurityDescriptor,InitializeAcl, SetSecurityDescriptorDacl, AddAccessAllowedAce and MakeSelfRelativeSD…,
After CreateFileMapping be called, Get the SD length by GetSecurityDescriptorLength , Get the kernel object pointer by GetKernelObjectSecurity, last copy the specify SECURITY_ATTRIBUTES to kernel object security.
It can read by OpenFileMapping(or CreateFileMapping) with the READ protection.
It will be fail when with WRITE protection, the return error code is ERROR_ACCESS_DENIED.
I try to get the kernel object pointer by GetKernelObjectSecurity after OpenFileMapping(read only), The ERROR_ACCESS_DENIED error code will be received.
Is it possible write the file mapping object in application?
B.R.
Allen