6 Mar
2009
6 Mar
'09
4:02 p.m.
Joy Vincent wrote:
I am attempting to create a windows_shared_memory object for a large file that exists using Boost 1.35. I have attempted to create it 2 ways:
interprocess::windows_shared_memory *wsm = new interprocess::windows_shared_memory(interprocess::open_or_create, fileName.c_str(), interprocess::read_only,fileSize);
Windows shared memory creates a shared memory not a file. windows_shared_memory is backed by the windows swap file not any arbitrary filesystem path. If you want to map a file use file_mapping + mapped region. Regards, Ion