problems witn MSXML in multi-threading applications
-
Hi, I've got a strange problem. I have a multithreading Win32 MFC application used MSXML. All XML-related procedures (loading, parsing and etc) are worked in a separated thread started with _begingthread(). This thread looks like as shown below. When this thread calls IXMLDOMDocument::load() to load an existed XML document from a file, this will stop an opening all Microsoft Office 2000 documents (Word,Excel and etc). This problem appears only under Windows 9x/ME. What's wrong? Help me! void XMLTrafReportThreadFunction(void *) { ::CoInitializeEx(NULL,COINIT_MULTITHREADED); IXMLDOMDocumentPtr XmlDocPtr; _bstr_t bstrXMLReport(lpszFilename); VARIANT_BOOL vtResult; HRESULT hr = XmlDocPtr.CreateInstance(MSXML::CLSID_DOMDocument); if (FAILED(hr)) return 0; vtResult=XmlDocPtr->load(bstrXMLReport); ... ... } Yours sincerely, Alex Bash