procedure THTTPServer.WebModuleCreate(Sender: TObject); begin { Each web module will be in a separate thread. We need to initialize the COM subsystem for each thread } if Assigned(ComObj.CoInitializeEx) then ComObj.CoInitializeEx(nil, COINIT_MULTITHREADED) else CoInitialize(nil); end; procedure THTTPServer.WebModuleDestroy(Sender: TObject); begin CoUninitialize; end;
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.