boost::interprocess communication between windows service and user application

View: New views
2 Messages — Rating Filter:   Alert me  

boost::interprocess communication between windows service and user application

by jmpulido :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I'm pretty new to boost::interprocess but I've been performing
some successful communication tests between two applications, using
boost::interprocess::shared_memory_object and
boost::interprocess::mapped_region. But when one of those processes is
a windows service, then I get a file not found exception (I've catched
it and dumped it into a file), just after initializing a
shared_memory_object.

It seems that the shared memory is actually managed by means of a file
in disk that probably the user is creating in a location and the
service in a different one.

I've been googling this issue for hours, but the only resource I was
able to find is this conversation:
http://stackoverflow.com/questions/488877/boostinterprocess-between-windows-service-and-user-application
which has not been very helpful since I have no clue on how to use
boost::interprocess::managed_windows_shared_memory or even if it could
serve to my purpose somehow.

Thank you.
_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: boost::interprocess communication between windows service and user application

by Ion Gaztañaga :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jmpulido escribió:
> It seems that the shared memory is actually managed by means of a file
> in disk that probably the user is creating in a location and the
> service in a different one.

This should be fixed for Boost 1.40, which version are you using?

> which has not been very helpful since I have no clue on how to use
> boost::interprocess::managed_windows_shared_memory or even if it could
> serve to my purpose somehow.

managed_windows_shared_memory is similar to managed_shared_memory but
the memory disappears when the last attached process ends and uses
native windows shared memory instead of file-based emulation.

Best,

Ion
_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users