I developed a Windows application using shared memory --- --- memory mapped files for interprocess communication. I have a windows service that does some processing and periodically writes data to a memory mapped file. I have a separate Windows application that reads from a memory mapped file and displays information. The application works as expected in Windows XP, XP Pro, and Server 2003, but not in Vista.
I see that the data written to the memory mapped file is executed correctly by the Windows service, because I can open the file with a text editor and view the saved messages, but the consumer application cannot read from the file. It is interesting to note that if I close the consumer application and restart it, it consumes messages that were previously written to the memory mapping file.
In addition, another strange thing is that I get the same behavior when I connect to a Windows host using Remote Desktop and the consumer application is called / used through Remote Desktop. However, if I call Remote Desktop and connect to the target host console session with the following command: mstsc -v:servername /F -console , everything works fine.
So why I think the problem is with permissions. Can anyone comment on this?
EDIT:
The ACL that I use to create a memory mapped file and Mutex objects that synchronize access is as follows:
TCHAR * szSD = TEXT("D:") TEXT("(A;;RPWPCCDCLCSWRCWDWOGAFA;;;S-1-1-0)") TEXT("(A;;GA;;;BG)") TEXT("(A;;GA;;;AN)") TEXT("(A;;GA;;;AU)") TEXT("(A;;GA;;;LS)") TEXT("(A;;GA;;;RD)") TEXT("(A;;GA;;;WD)") TEXT("(A;;GA;;;BA)");
I think this may be part of the problem.
windows memory-access shared
James wheattstone
source share