I am getting an error: CoInitialize has not been called. It happens when I call the LoadFromFile method of a TXMLDocument.
According to Google, this is a COM problem. TXMLDocument uses COM to parse the xml file. So I need to first CoInitialize COM for the current thread, then later CoUnInitialize it. However, delphi help seems to not know of these two methods, and the only thing I can find is CoInitFlags, which is a variable in ComObjs (CoInitialize and CoUnInitialize don't seems to be in ComObjs), and for my application is set to 0 (multithreaded). Not that I set it anywhere myself, but that is the value it has when I debug. A little about my application: It is a websnap app. I am introducing the xml bit to make it compatible with another application that shares some of the code base. The websnap application has always used ADO, which apparently has COM as well, and we've never had this problem. The xml is for setup, and is used in the creation of a particular web data module. Funnily enough, this problem is intermittant. When the first page called is the application's TWebAppPageModule everything is hunky dory for ever and ever. When the first page called is a TWebPageModule then it goes sour. It's not the best explanation, but hopefully someone can shed some light on this for me. _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
