Subject: Re: [boost] [interprocess] (Win32) shared memory totally doesn't work :(
From: David M. Cotter (me_at_[hidden])
Date: 2010-06-14 20:21:08
to be perfectly clear:
each time i call get_system_time_of_day_information() , i get the SAME number in the high 32 bits but a DIFFERENT number in the low 32bits. of info.data.liKeBootTime.
if i do this right after the call:
info.data.liKeBootTime &= 0xFFFFFFFF00000000;
then everything works as expected.
On Jun 14, 2010, at 4:28 PM, David M. Cotter wrote:
> so in process A i do this:
> shared_memory_object obj(create_only, "guid of some kind", read_write);
> during the construction of that object, it makes a call to "get_boot_time_str()" to construct a folder name based on the boot time. this makes sense, so process B can locate the SAME folder, cuz the boot time is the same, right?
> well, wrong.
> you see, the function *says* get_BOOT_time, but it is actually getting boot PLUS SYSTEM (current) time. which is going to be different for the two processes, unless they made the call at the *exact* same time.
> so it would seem, unless i'm totally misunderstanding this, that it is impossible to use the shared memory thing as it is implemented.
> if i *remove* the part where it relies on SYSTEM time and only let it use BOOT time, everything works as documented and as expected.
> what is this about? i'm so curious how other people could be using this?