Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-09-18 11:01:44


nuaafantasy nuaafantasy wrote:
> Dear All:
> when I create a message queue named with "Global\\abc",there is a
> interprocess exception,said that "The system cannot find the path
> specified."
> but if I named it "abc",it can be created
> My Os is Windows XP,because I want to use message queue between service and
> applicaiton,I must create a global shared memory.
> is there somebody can help me tackle with the problem? thanks a lot.
> is it an error of naming rule?

In Windows, Boost.Interprocess shared memory uses mapped files to
emulate POSIX lifetime. That's why you get that error. Message queues
are based on portable shared so you get the same error. To obtain native
windows shared memory you can use "windows_shared_memory" and
"managed_windows_shared_memory" classes, but I haven't developed a
windows-only version of the message queue. I'll add it to my to-do list.

Nevertheless, if both the service and the user have access to the file
(which is created in the temporary directory of the user) you will be
able to communicate both. But I'm not a windows expert, so I might be wrong.

Regards,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk