调用CoInitializ和CoUninitialize,创建CreateOleObject,为什么在最后程序结束的时候不能正常退出?求教。==============================================
program DycCreate;
uses
  SysUtils,
  Windows,
  Messages,
  ActiveX,
  uMessage in 'uMessage.pas',
  uDBAccess in 'uDBAccess .pas';{$R icon.res}var
  hInstance: HWND;
  lpMsg: tagMSG;
  hModuleMutex: HWND;begin
  hModuleMutex := OpenMutex(MUTEX_ALL_ACCESS, false, '{273256A6-CFFA-47B1-92C1-63DDCFFE54D8}');
  if hModuleMutex =0 then
  begin
    hModuleMutex := CreateMutex(nil, false, '{273256A6-CFFA-47B1-92C1-63DDCFFE54D8}');
    CoInitialize(nil);
    hInstance := GetModuleHandle(nil);
    if CreateMyWindow(hInstance, SW_SHOWNORMAL) <> 0 then
      while GetMessage(lpMsg, 0, 0, 0) do
      begin
        TranslateMessage(lpMsg);
        DispatchMessage(lpMsg);
      end;
    CoUninitialize;
    ReleaseMutex(hModuleMutex);
  end;
end.=================================================
//部分代码;
function GetEmplyInfo(pSerial: Array of Char): Integer;
var
  ADOConn: OleVariant;
begin
  ADOConn := CreateOleObject('ADODB.Connection');
  ...
  ...
  ADOConn.Close;
  ADOConn := Unassigned;
end;==================================================当程序退出后,主窗体关闭,但在任务管理器中本程序并没有结束,调试也是要按Ctrl + F2才能关闭。若不出发CreateOleObject函数,则没有问题,可以退出。请问这是什么原因?