try { MSXML2::IXMLDOMDocumentPtr pXmlDoc; pXmlDoc.CreateInstance(__uuidof(MSXML2::DOMDocument60)); if (pXmlDoc == NULL) return FALSE; pXmlDoc->async = VARIANT_FALSE; } catch(const _com_error& ex) { AfxMessageBox(ex.ErrorMessage()); return FALSE; }