QAxBase Error calling IDispatch member occures only when Debugging without Breakpoints
Unsolved
General and Desktop
-
wrote on 8 Jul 2020, 11:08 last edited by
Hello Everyone,
I'm having a weird situation when I run the following Code
if (ZFsolutionFile.exists()) { { printf("The Solution exists! Opening...\n"); pSln->Open(ZFsolutionFile.fileName()); printf("Solution is Open\n"); } EnvDTE::Projects *projects = pSln->Projects(); //Get Array of all Projects in Solution if (projects == NULL) { printf("ERROR: No project objects could be found.\n"); return -1; } pPrj = projects->Item(QVariant(1)); // Choose first Project of Solution if (pPrj == NULL) { printf("ERROR: Project object could not be created.\n"); return -1; }
When I debug this Code with Breakpoints it works fine! When I run it without Breakpoints i get the following Error
QAxBase: Error calling IDispatch member Projects: Unknown error
Why does this occur when not using breakpoints and how to fix it ?
Thanks in advance
1/1