Boost logo

Boost :

Subject: Re: [boost] [interprocess] Different processes accessing shared memory in different locations
From: Tom Sanham (tom_at_[hidden])
Date: 2013-09-11 07:09:18


Yes that does help. Thank you very much.

We fixed the registry on the PC in question and the problem is now solved.

Tom

-----Original Message-----
From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Ion Gaztanaga
Sent: Tuesday, September 10, 2013 4:51 PM
To: boost_at_[hidden]
Subject: Re: [boost] [interprocess] Different processes accessing shared memory in different locations

El 10/09/2013 12:01, Tom Sanham escribió:
> Hi
>
> Our application has the following scenario using Boost V1.0.52:
>
> 1) Process A writes to boost interprocess shared memory. The files
> appear at
> C:\ProgramData\boost_interprocess\...
>
> 2) Process A launches Process B
>
> 3) Process B attempts to read from shared memory but fails. It is
> attempting to read from:
> C:\Users\<username>\AppData\Local\Temp\boost_interprocess\...
>
> This failure only occurs on one single Windows 8 64 bit machine out of
> many we have tested. On all other machines, the application works
> perfectly.

If you look in boost/interprocess/detail/tmp_dir_helpers.hpp:

    #if defined (BOOST_INTERPROCESS_WINDOWS)
       winapi::get_shared_documents_folder(tmp_name);
       if(tmp_name.empty() || !winapi::is_directory(tmp_name.c_str())){
          tmp_name = get_temporary_path();
       }
    #else

if shared documents folder is not found, then the temporary path is
used. The shared documents folder is found in the registry in the
following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\Common AppData

Hope it helps,

Ion

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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