Re: Ado inside dll ?




>Thanks, so what does CoInitialize and CoUninitialize ?
CoInitialize initializes COM and Ado uses COM
In an normal .exe applicaiton co-initialize is handled in the
applicaiton.initialize line of your .dpr file.
For DLLs Service applications and treads you need to handle Coinitialize in your
code.
When ever you call CoInitialize you should CoUninitialze when you are finished.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • CoUninitialize() and CComPtr<> object lifetimes
    ... I have tracked down a bug involving object lifetimes to a quirk in CComPtr<> ... help that CoInitialize() is being called somewhere in the app framework. ... CoUninitialize(); ... What is going on with this DLL? ...
    (microsoft.public.vc.atl)
  • Re: Windows Service & ADO problem
    ... As ADO is based on COM it needs to call coInitialize to initialize its ... Well, actually Microsoft recommends to ... if you don't call coUninitialize there is a lot of things not ... It also may be a problem with MDAC or COM corruption/bug. ...
    (borland.public.delphi.database.ado)
  • Re: Calling Coinitialize
    ... > Delphi 5 C/S compiled programs and use ADO. ... > the dll's doesn't seem to help) and then it will immediately crash ... not calling coInitialize and coUninitialize at all. ...
    (borland.public.delphi.database.ado)
  • Re: Question Error Access violation in CoUninitialize() call
    ... Success = false; ... CoInitialize may fail and if it does, ... CoUninitialize. ... If you decide you should be calling CoInitialize, ...
    (microsoft.public.win32.programmer.ole)
  • Re: Question Error Access violation in CoUninitialize() call
    ... CoInitialize may fail and if it does, ... If you decide you should be calling CoInitialize, ... fails, do not call CoUninitialize. ... released all interfaces before calling CoUninitialize. ...
    (microsoft.public.win32.programmer.ole)