Hi
My software is a thread that every n minutes calls the method for obtaining the outlook appointments. The problem is that the method crashes down.
This is a part of code of the constructor of the thread:
This is a part of code of the contrstuctor of class OutlookManager, which reads data from Outlook and contains a field Outlook::Application outlookCode:
OutlookManager* poiOutMan = new OutlookManager();
This is the run of the thread:Code:
if (!outlook.isNull()) { Outlook::NameSpace session(outlook.Session()); folder = session.GetDefaultFolder(Outlook::olFolderContacts); }
And this is the method checkApp:Code:
void BaseThread::run() { //while (lock == true) { poiOutMan -> checkApp(); //} }
Could you please help me? I've tried to find a solution since two days ago but no luck ;(Code:
void OutlookManager::checkApp() { some operations with folder }This code crashes in the checkApp method with this error: ASSERT: "id < 0" in file qaxbase.cpp, line 3710 So I've tried to launch the construction of OutlookManager directly in the run of the thread and to import the checkApp code in the constructor of OutlookManager but it returns a compile error: Starting C:\Documents and Settings\STAGE04\Desktop\Stage Gian\VisionSync\debug\VisionSync.exe... CoCreateInstance failure (CoInitialize was not called) QAxBase::setControl: requested control {0006f03a-0000-0000-c000-000000000046} could not be instantiated