Hello,
This is happening both with qt examples and my own sample code. Specifically, when I execute this:
QSharedMemory* mem = new QSharedMemory("testkey");
mem->create(sizeof(int));
if (mem->attach())
qDebug() << "Successful attach()";
else
qDebug() << "attach() failed, code " << mem->error() << ", " << mem->errorString();
QSharedMemory* mem = new QSharedMemory("testkey");
mem->create(sizeof(int));
if (mem->attach())
qDebug() << "Successful attach()";
else
qDebug() << "attach() failed, code " << mem->error() << ", " << mem->errorString();
To copy to clipboard, switch view to plain text mode
I get this:
attach() failed, code 0 , ""
The same thing happens with the examples (examples/ipc/sharedmemory and another one from Nokia that displays images). The attach fails yet no error flag is thrown. Moreover this happens on Max 10.5, Windows XP, and Ubuntu 9.10; I'm using Qt 4.5.3. Does anybody know what's going on? Thank you--
Matt
Bookmarks