Using CoInitialize in a Delphi thread
问题 I am using TIdHttp and TXMLDocument inside a thread in a Delphi program. Now I want to know: Do these classes use COM objects so I need to call CoInitialize and CoUninitialize in this thread? If yes, do I have to use these functions at the body of execute method or at all methods that use TIdHttp or TXMLDocument classes? 回答1: TIdHTTP has no COM dependency. TXMLDocument can have a dependency on COM. On Windows, out of the box it is a wrapper around Microsoft's MSXML ActiveX component, which