How do I eliminate the "CoInitialize has not been called" error?
COM libraries can be picky about when CoInitialize is called. In order to guarantee it is initialized at the proper time, use the following unit (save it as ComInit.pas):
unit ComInit;
interfaceuses
ActiveX;
implementationinitialization
CoInitializeEx(nil,COINIT_MULTITHREADED);
finalization
CoUninitialize;
end.
Make sure this is the first unit listed in the "uses" statement of your .DPR file. For example:
uses
ComInit in'ComInit.pas',
WebBroker,
ApacheApp,
dMain in'dMain.pas'{dmMain: TcxWebHomeDataModule},
wMain in'wMain.pas'{wpmMain: TcxWebPageModule} {*.html;}