QSharedMemory::handle doesnt exist error [SOLVED]
-
I'm trying this bellow QT code :
@
#include <QtCore/QCoreApplication>
#include<QDebug>
QSharedMemory g_objSharedMemory(QString("Shared Memory"));int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); if(g_objSharedMemory.isAttached()==false) { qDebug()<<"Shared memory is not attached !!!!trying to attach it\n "; qDebug()<<g_objSharedMemory.errorString(); if(g_objSharedMemory.attach()==false) { qDebug()<<"Failed to attach shared memory to the process!!!!"; qDebug()<<g_objSharedMemory.errorString(); return 0; } } return a.exec(); }@
I'm failed to attach the shared memory segment to the process. I'm building this code on windows xP
I'm getting "QSharedMemory::handle doesnt exist error".
How can i fix this error ?