I using CreateFileMapping and MapViewOfFile to use a file as Shared storage between two process.
The process A, it is running as Service in session 0, to clear the content in file mapping.
The process B, it is a normal process run in session 1, to read and write the content in file mapping.
Using process B first, there has some data were stored into file mapping and terminates. Then, run the Process A to clear data. In my expectation, after execute process A, the file mapping would become empty. But It didn't.
And if I change the privilege of Process A, running it as normal process and in session 1. All of them are works correctly.
My question is, the file mapping with same name are not identical between different session on windows?
And does there has any function can create a thread to run in session 1 from a process in session 0? (I have tried impersonate as user session before create_thread in the process of session 0, it doesn't work)
Thank you.