Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi

i want to open a website from BMP emulator. I have written the following code for that:

if (ISHELL_CreateInstance(pMe->pIShell,
AEECLSID_SSLROOTCERTS,(void **)&piRoots) ! AEE_SUCCESS) {
//handle failure;
}

// Create instance of IWeb
if (ISHELL_CreateInstance(pMe->pIShell,
AEECLSID_WEB, (void**)&pMe->pIWeb) != AEE_SUCCESS) {
//handle failure;
}

// Make HTTP GET request to https address

CALLBACK_Init(&pMe->pcb, WebAction_GotResp, pMe);
IWEB_GetResponse(pMe->pIWeb,
(pMe->pIWeb, &pMe->pIWebResp,
&pMe->pcb,"http://172.11.5.90/hello",WEBOPT_DEFAULTS,piRoots,WEBOPT_END));

And the callback function is:

static void WebAction_GotResp(void *p)
{
web_demo *pwa = (web_demo *)p;

WebRespInfo *pwri;

// get information about how the web transaction went
// pwa->piWResp is ***NEVER NULL***, even though the transaction may fail
// for wont of memory
pwri = IWEBRESP_GetInfo(pwa->pIWebResp);
if (WEB_ERROR_SUCCEEDED(pwri->nCode)) {
DBGPRINTF("IWEBRESP_GetInfo :%d",pwri->nCode);
}

}
Iam getting the IWEBRESP_GetInfo error code as 200 and its getting printed, which means WEB_ERROR_SUCCEEDED returns TRUE.
But i can't see the site being opened in my emulator:(

How to acheive that? Please help

Thanks in advance
Annu

Site won't be opened in simulator. You will receive data in pwri->pisMessage as html stream. You needs to display that data separately.

Site won't be opened in simulator. You will receive data in pwri->pisMessage as html stream. You needs to display that data separately.