Reputation: 1502
I'm using boost::interprocess to communicates between two applications. When the two applications are launch by the same user, it works great.
When one of the application is a service, it fails.
I found that the shared media is in fact a file that is created in the "TMP" directory. So it fails because each application is creating his own file in his own "TMP" directory.
Maybe I'm not using it the good way for my particular purpose.
Does anybody having a clue of how to solve my problem?
Thanks a lot,
Nic
EDIT: I tried using "managed_mapped_file". My problem is that the win32 implementation is calling "CreateFileMapping" without specifying a name for the object. In my special case, I think I need to specify something like "Global\MyMappedFile" so that both the application and the service can view the mapped file.
Upvotes: 4
Views: 2307
Reputation: 11
it's something about the Window Stations and ACL. you need to modify the source to make it work between windows service and user application. in vista and win7, services run at winsta0, but applications at winsta1. so you need to give a LPSECURITY_ATTRIBUTES with the right DACL.
Upvotes: 1
Reputation: 1502
Here is something that works :
Maybe somebody can find a better way ;-)
Nic
Upvotes: 5