Application hangs after CoUninitialize

Giganews Newsgroups
Subject: Application hangs after CoUninitialize
Posted by:  Michael Fritz (
Date: Mon, 30 Jul 2007


I've imported some OCX controls (to connect to SAP R/3) which work fine.
However when closing my test application is keeps running, doing nothing
and I have to quit the app using STRG+F2 (using Delphi 7, btw).

Searching the cause for this behavior, I include the debug dcu's and
tracked down the problem to the line
    if NeedToUninitialize then CoUninitialize;
in ComObj.

When setting NeedToUninitialize to false, in debugger, the application
quits without any problems. So what's the deal with it? I cannot access
this var from any external unit so no chance to stop the app from calling