IXMLHTTPRequest

webmasterbeta

New Member
Hi,I'm using the XMLHTTPRequestPtr interface in a VC++ application to retrieveXML data from an ASP.*******************************************************CoInitialize(NULL);xml::IXMLDOMDocumentPtr l_pDoc;xml::IXMLHTTPRequestPtr l_pHttpRequest;l_pDoc.CreateInstance(__uuidof(xml::DOMDocument));l_pHttpRequest.CreateInstance("msxml2.XMLHTTP");l_pHttpRequest->open("GET","http://www.mytestsite.com/mytest.asp",false);l_pHttpRequest->send();l_pDoc=l_pHttpRequest->responseXML;l_pHttpRequest.Release();l_pDoc.Release();CoUninitialize();*******************************************************I wonder how I can detect if the url exists? send() seems to be returningthe same value, even if I pass a non-existing URL to the open() function!Another problem is that send doesn't return if my connection is lost !?!Can anyone please help me out with this ???Thanks ... Sven
 
Back
Top