Now in addition to that, I created a shared memory using Boost shared memory in Qt, wrote a string into that. Then tried to access the same using another Boost program compiled in Cygwin-g++. Here get_size() is giving 0 and string is not being read. But surprising thing is, if I delete the same shared memory (for the specified key) using remove statement in cygwin-g++ program, it's getting deleted.
bool isRemoved = boost::interprocess::shared_memory_object::remove("ShrdMem");
std::cout << "Value = " << isRemoved << std::endl; // Value = 1
bool isRemoved = boost::interprocess::shared_memory_object::remove("ShrdMem");
std::cout << "Value = " << isRemoved << std::endl; // Value = 1
To copy to clipboard, switch view to plain text mode
Writing in Qt(using QSharedMemory), then reading using Boost shared memory - Not working as expected
Writing in Qt(using boost shared memory), then reading using Boost shared memory - Not working as expected
Writing in Boost, reading in Boost(both compiled & run in cygwin-g++) - Working fine (tested to read the string/int value).
Any help pls. Thank you.
Bookmarks