Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General:( Very Noob question Pin
jeremysay20-Feb-03 22:58
jeremysay20-Feb-03 22:58 
GeneralRe: :( Very Noob question Pin
Martyn Pearson21-Feb-03 0:03
Martyn Pearson21-Feb-03 0:03 
GeneralRe: :( Very Noob question Pin
jeremysay21-Feb-03 1:53
jeremysay21-Feb-03 1:53 
GeneralRe: :( Very Noob question Pin
Gary Kirkham21-Feb-03 2:25
Gary Kirkham21-Feb-03 2:25 
GeneralRe: :( Very Noob question Pin
jeremysay21-Feb-03 3:10
jeremysay21-Feb-03 3:10 
GeneralRe: :( Very Noob question Pin
AlexO21-Feb-03 2:42
AlexO21-Feb-03 2:42 
GeneralRe: :( Very Noob question Pin
jeremysay21-Feb-03 3:13
jeremysay21-Feb-03 3:13 
GeneralFailed to CreateInstance while using IXMLHttpRequestPtr Pin
adapterJohn20-Feb-03 22:52
adapterJohn20-Feb-03 22:52 
Hello, I am using MSXML to get HTTP response from a webserver. The problem is when I use
pIXMLHTTPRequest.CreateInstance("Microsoft.XMLHTTP");
it always goes to error and can't continue to open the connection.
Can someone tell me where possibly the problem is, and why should I create the instance?
Many thanks in advance.
*****************************************


BOOL CAPIDlg::MakeRequest()
{

BOOL bRetVal=FALSE;
BSTR Result=NULL;

try{
MSXML::IXMLHttpRequestPtr pIXMLHTTPRequest;
HRESULT hResult;
hResult = pIXMLHTTPRequest.CreateInstance("Microsoft.XMLHTTP");
//Test the connection
if ( FAILED(hResult) ) {
MessageBox("Fail to create the connection");
return bRetVal;
}


MessageBox("Continue anyway");
//Open the connection
pIXMLHTTPRequest->open("POST",(_bstr_t)"www.yahoo.com");
//Send the request
pIXMLHTTPRequest->send();
MessageBox("Success to open");
//Get the result
Result=pIXMLHTTPRequest->responseText;
if(Result)
//Display the result
{m_Result.SetWindowText((_bstr_t)Result);
}

else
//Report error
MessageBox("Can't make the connection");




}
catch(...) {
//Report error
MessageBox("Can't initialize the HTTP request");
}

return true;


}
Generalsome macros Pin
karanba20-Feb-03 22:46
karanba20-Feb-03 22:46 
GeneralRe: some macros Pin
-Dy20-Feb-03 22:56
-Dy20-Feb-03 22:56 
GeneralRe: some macros Pin
João Paulo Figueira20-Feb-03 22:58
professionalJoão Paulo Figueira20-Feb-03 22:58 
Generalcreate a user on Win 2000 Pin
Sonu Kapoor20-Feb-03 22:42
Sonu Kapoor20-Feb-03 22:42 
GeneralCTreeCtrl crash Pin
memyself20-Feb-03 22:21
memyself20-Feb-03 22:21 
GeneralRe: CTreeCtrl crash Pin
João Paulo Figueira20-Feb-03 22:30
professionalJoão Paulo Figueira20-Feb-03 22:30 
GeneralRe: CTreeCtrl crash Pin
Anonymous20-Feb-03 23:02
Anonymous20-Feb-03 23:02 
GeneralRe: CTreeCtrl crash Pin
João Paulo Figueira20-Feb-03 23:07
professionalJoão Paulo Figueira20-Feb-03 23:07 
GeneralRe: CTreeCtrl crash Pin
jeremysay20-Feb-03 23:04
jeremysay20-Feb-03 23:04 
GeneralRe: CTreeCtrl crash Pin
Anonymous21-Feb-03 0:40
Anonymous21-Feb-03 0:40 
GeneralRe: CTreeCtrl crash Pin
Neville Franks21-Feb-03 1:01
Neville Franks21-Feb-03 1:01 
Generalrendering text using opengl Pin
ajit0720-Feb-03 22:04
ajit0720-Feb-03 22:04 
GeneralRe: rendering text using opengl Pin
Moak21-Feb-03 0:30
Moak21-Feb-03 0:30 
Generalsetting the text of a static control programmatically. Pin
Anonymous20-Feb-03 21:53
Anonymous20-Feb-03 21:53 
GeneralRe: setting the text of a static control programmatically. Pin
João Paulo Figueira20-Feb-03 22:01
professionalJoão Paulo Figueira20-Feb-03 22:01 
GeneralRe: setting the text of a static control programmatically. Pin
Anonymous20-Feb-03 22:17
Anonymous20-Feb-03 22:17 
QuestionTrue modal dialog? Pin
Bash20-Feb-03 21:38
Bash20-Feb-03 21:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.