Click here to Skip to main content
15,927,803 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: BSTR data type ... huh? Pin
safee ullah30-Apr-03 19:54
safee ullah30-Apr-03 19:54 
GeneralRe: BSTR data type ... huh? Pin
Nathan Ridley30-Apr-03 20:15
Nathan Ridley30-Apr-03 20:15 
GeneralRe: BSTR data type ... huh? Pin
David Crow1-May-03 3:41
David Crow1-May-03 3:41 
AnswerRe: BSTR data type ... huh? Pin
Ryan Binns30-Apr-03 20:23
Ryan Binns30-Apr-03 20:23 
GeneralRe: BSTR data type ... huh? Pin
Ryan Binns30-Apr-03 20:29
Ryan Binns30-Apr-03 20:29 
GeneralRe: BSTR data type ... huh? Pin
Nathan Ridley30-Apr-03 20:34
Nathan Ridley30-Apr-03 20:34 
GeneralRe: BSTR data type ... huh? Pin
Ryan Binns30-Apr-03 20:40
Ryan Binns30-Apr-03 20:40 
GeneralRe: BSTR data type ... huh? Pin
Nathan Ridley30-Apr-03 20:53
Nathan Ridley30-Apr-03 20:53 
[Short Homer Scream]AARGH![/Short Homer Scream]

I get these errors...
D:\cdev\XMLTest\XMLTestDlg.cpp(195) : error C2065: '_lpw' : undeclared identifier
D:\cdev\XMLTest\XMLTestDlg.cpp(195) : error C2440: '=' : cannot convert from 'unsigned short *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\cdev\XMLTest\XMLTestDlg.cpp(195) : error C2065: '_convert' : undeclared identifier

My code looks like this:
void CXMLTestDlg::OnButton1() 
{
	IXMLHTTPRequest* pIXMLHttpRequest = NULL;
	HRESULT hr = CoInitialize(NULL);
	hr = CoCreateInstance(	CLSID_XMLHTTP,
				NULL,
				CLSCTX_INPROC_SERVER,
				IID_IXMLHTTPRequest,
				(void**)&pIXMLHttpRequest);
	BSTR bstrString = NULL;
	
	try
	{
		// Create XMLHttpRequest object and initialize pIXMLHttpRequest.
		hr = pIXMLHttpRequest->open(_bstr_t(_T("GET")),
					_bstr_t(_T("http://top01wdt1:8090/test.htm")),
					_variant_t(VARIANT_FALSE),
					_variant_t(""),
					_variant_t(""));
		if(SUCCEEDED(hr)) {
			BSTR* pbsz = NULL;
			hr = pIXMLHttpRequest->get_responseText(pbsz);
			LPCTSTR lpsz = W2T(*pbsz);
			CString x(lpsz);
			m_szOutput = test;
			UpdateData(FALSE);
		}
	}
	catch(...)
	{
		MessageBox("Failure!");
	}
	// to do... release pointer memory...
}


NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
GeneralRe: BSTR data type ... huh? Pin
Ryan Binns30-Apr-03 20:58
Ryan Binns30-Apr-03 20:58 
GeneralRe: BSTR data type ... huh? Pin
Nathan Ridley30-Apr-03 21:09
Nathan Ridley30-Apr-03 21:09 
GeneralQUESTION: Bug in code! Pin
Nathan Ridley1-May-03 13:23
Nathan Ridley1-May-03 13:23 
AnswerRe: BSTR data type ... huh? Pin
Renjith Ramachandran1-May-03 0:16
Renjith Ramachandran1-May-03 0:16 
AnswerRe: BSTR data type ... huh? Pin
Michael Dunn1-May-03 0:25
sitebuilderMichael Dunn1-May-03 0:25 
Generalany idea of DECLARE_OLECREATE_EX and DECLARE_OLECTLTYPE in OLE Controls Pin
safee ullah30-Apr-03 19:26
safee ullah30-Apr-03 19:26 
GeneralGet child window's handles(HWND) Pin
Chintan30-Apr-03 18:31
Chintan30-Apr-03 18:31 
GeneralRe: Get child window's handles(HWND) Pin
Martyn Pearson30-Apr-03 22:06
Martyn Pearson30-Apr-03 22:06 
GeneralOLE Pin
Gary Kirkham30-Apr-03 16:31
Gary Kirkham30-Apr-03 16:31 
GeneralRe: OLE Pin
safee ullah30-Apr-03 19:21
safee ullah30-Apr-03 19:21 
GeneralRe: OLE Pin
David Crow1-May-03 3:51
David Crow1-May-03 3:51 
GeneralRe: OLE Pin
Gary Kirkham1-May-03 4:20
Gary Kirkham1-May-03 4:20 
GeneralRe: OLE Pin
David Crow1-May-03 4:22
David Crow1-May-03 4:22 
GeneralRe: OLE Pin
Gary Kirkham1-May-03 5:00
Gary Kirkham1-May-03 5:00 
GeneralRe: OLE Pin
David Crow1-May-03 5:04
David Crow1-May-03 5:04 
GeneralRe: OLE Pin
Gary Kirkham2-May-03 16:16
Gary Kirkham2-May-03 16:16 
GeneralLooking for a programmer to take over an RPG project Pin
Josh Cronkhite30-Apr-03 13:25
Josh Cronkhite30-Apr-03 13:25 

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.