Regarding MSXML3.0 [modified]
-
Hi All, i'm using IXMLDOMDocumentPtr for loading xml and do operations on it. when i run my application with purify it is showing a memory leak in CreateInstance & loadXML. please give me a suggestion where am i wrong? or what changes i need to do. here is my sample code: BSTR bstrUserInputsXml=NULL; { CoInitialize(NULL); IXMLDOMDocumentPtr pXMLDom=NULL; hr=pXMLDom.CreateInstance( "Microsoft.XMLDOM" ); //hr=pXMLDom.CreateInstance( __uuidof(MSXML2::DOMDocument40)); if(FAILED(hr)) { //cout<<"Failed to instantiate DOMDocument40"<load("D:\\userinputs1.xml")!= VARIANT_TRUE) { //MessageBox(NULL,"Failed load xml string","KeyTable.s",MB_OK); return ; } bstrUserInputsXml = pXMLDom->xml; pXMLDom.Release(); CoUninitialize(); } Thanks in advance. Prashanthv -- modified at 14:02 Friday 27th April, 2007
-
Hi All, i'm using IXMLDOMDocumentPtr for loading xml and do operations on it. when i run my application with purify it is showing a memory leak in CreateInstance & loadXML. please give me a suggestion where am i wrong? or what changes i need to do. here is my sample code: BSTR bstrUserInputsXml=NULL; { CoInitialize(NULL); IXMLDOMDocumentPtr pXMLDom=NULL; hr=pXMLDom.CreateInstance( "Microsoft.XMLDOM" ); //hr=pXMLDom.CreateInstance( __uuidof(MSXML2::DOMDocument40)); if(FAILED(hr)) { //cout<<"Failed to instantiate DOMDocument40"<load("D:\\userinputs1.xml")!= VARIANT_TRUE) { //MessageBox(NULL,"Failed load xml string","KeyTable.s",MB_OK); return ; } bstrUserInputsXml = pXMLDom->xml; pXMLDom.Release(); CoUninitialize(); } Thanks in advance. Prashanthv -- modified at 14:02 Friday 27th April, 2007