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

Developer

Forums

Forums:

Hi,

Am getting 2 errors telling the "Error 1 error C2065: 'DisplayOutput' : undeclared identifier " and
Error 2 error C2365: 'DisplayOutput' : redefinition; previous definition was 'data variable'

Can anybody let me know how to rectify it....

cpszUrl =(char*)MALLOC(100 * sizeof(char));
//pMe->pcb= DisplayOutput(pMe);
STRCPY(cpszUrl,(char*)"http://bhairavi/(S(vthwrfbzjdopop45uncugsaq))/Default.asp");
if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_WEB,(void **)(&pMe->pIWeb)) != SUCCESS)
return FALSE;
if ( pMe->pIWeb)
{
CALLBACK_Init(pMe->pcb, DisplayOutput , pMe);
WEB_GetResponse(pMe->pIWeb, (pMe->pIWeb, &pMe->ppiwresp, &pMe->pcb, cpszUrl, WEBOPT_HANDLERDATA, &pMe,WEBOPT_END));
}
else
{
ISHELL_LoadResString(pMe->a.m_pIShell,WEBB_RES_FILE,
IDS_STRING1, szBuf, sizeof (szBuf));
IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf,-1,10,10,0,0);
IDISPLAY_Update( pMe->a.m_pIDisplay);
}

declare da prototype for da function it resolve ur problem i feel..

declare da prototype for da function it resolve ur problem i feel..

Hi Manju,
I hav declared the prototype.. still am getting the error...

Hi Manju,
I hav declared the prototype.. still am getting the error...

Chekc if you have any other variable with same name..

Chekc if you have any other variable with same name..

Thank You... the spelling of the function name DisplayOutput was typed incorrectly in the prototype...

Thank You... the spelling of the function name DisplayOutput was typed incorrectly in the prototype...

Now am getting an error which says unresolved external symbol _WEB_GETRESPONSE.... which i hav used as show in the Code Snippet ...

Now am getting an error which says unresolved external symbol _WEB_GETRESPONSE.... which i hav used as show in the Code Snippet ...

void http_webrequest(helloworld* pMe)
{
char* url="http://laurel.datsi.fi.upm.es/~vrobles/_media/icons/phone.png?cache=cach...";
if(!pMe->m_pIWeb && ISHELL_CreateInstance( pMe->a.m_pIShell, AEECLSID_WEB, (void **)(&pMe->m_pIWeb))!= SUCCESS)
{
pMe->m_pIWeb=NULL;
return;
}
CALLBACK_Init(&pMe->m_Callback,WebReadCB,pMe);
IWEB_GetResponse(pMe->m_pIWeb,(pMe->m_pIWeb,&pMe->m_pIWebResp,&pMe->m_Callback,url,WEBOPT_STATUSHANDLER, WebAction_Status,WEBOPT_END));
}
sample function for http transaction

void http_webrequest(helloworld* pMe)
{
char* url="http://laurel.datsi.fi.upm.es/~vrobles/_media/icons/phone.png?cache=cach...";
if(!pMe->m_pIWeb && ISHELL_CreateInstance( pMe->a.m_pIShell, AEECLSID_WEB, (void **)(&pMe->m_pIWeb))!= SUCCESS)
{
pMe->m_pIWeb=NULL;
return;
}
CALLBACK_Init(&pMe->m_Callback,WebReadCB,pMe);
IWEB_GetResponse(pMe->m_pIWeb,(pMe->m_pIWeb,&pMe->m_pIWebResp,&pMe->m_Callback,url,WEBOPT_STATUSHANDLER, WebAction_Status,WEBOPT_END));
}
sample function for http transaction

I am getting an error.. which says
"Error 2 error C2223: left of '->pfnNotify' must point to struct/union c:\Proj\webb\webb\webb.c 176 " with respect to the CallBack_Init() which i had sent earlier...

I am getting an error.. which says
"Error 2 error C2223: left of '->pfnNotify' must point to struct/union c:\Proj\webb\webb\webb.c 176 " with respect to the CallBack_Init() which i had sent earlier...

CALLBACK_Init(&pMe->pcb, DisplayOutput , pMe);
initialize da callback as shown above and declare pMe->pcb
in ur applet structure as below,
AEECallback pcb;

CALLBACK_Init(&pMe->pcb, DisplayOutput , pMe);
initialize da callback as shown above and declare pMe->pcb
in ur applet structure as below,
AEECallback pcb;

Hi shiny,
this is ur code

CALLBACK_Init(pMe->pcb, DisplayOutput , pMe);

U have done mistake in intialaizing the callback function. Try this

CALLBACK_Init(&pMe->pcb, DisplayOutput , pMe);

Hi shiny,
this is ur code

CALLBACK_Init(pMe->pcb, DisplayOutput , pMe);

U have done mistake in intialaizing the callback function. Try this

CALLBACK_Init(&pMe->pcb, DisplayOutput , pMe);

Thank you guys...
am new to these concepts...tht is why getting stuck with minor errors..
Which is the prototype to be used in order to use Web_GetResponse().. cos am getting an error which says
Error 4 error LNK2019: unresolved external symbol _WEB_GetResponse referenced in function _webb_HandleEvent webb.obj
even though i hav included AEEWeb.h....

Thank you guys...
am new to these concepts...tht is why getting stuck with minor errors..
Which is the prototype to be used in order to use Web_GetResponse().. cos am getting an error which says
Error 4 error LNK2019: unresolved external symbol _WEB_GetResponse referenced in function _webb_HandleEvent webb.obj
even though i hav included AEEWeb.h....

not getting wats ur problem exacrly why u want to use one more function
directly use
IWEB_GetResponse
as shown above and still if u get error then lemme know, use da above eg code given if ur trying for an http connection..
And please gothru api doc ull get better idea than this for da usage of iweb or search this forum itself there are n no threads on iweb which will be helpful..

not getting wats ur problem exacrly why u want to use one more function
directly use
IWEB_GetResponse
as shown above and still if u get error then lemme know, use da above eg code given if ur trying for an http connection..
And please gothru api doc ull get better idea than this for da usage of iweb or search this forum itself there are n no threads on iweb which will be helpful..

Hi,
My code is not working still.. :( is there any website which provide proper and clear info abt IWEB... i went thru iweb apis in brew doc ... but the info given is not clear.. pls give me in detail info abt IWEB_GetResponse... and why do we use Callback_Init() before IWEB_Getresponse function..

Hi,
My code is not working still.. :( is there any website which provide proper and clear info abt IWEB... i went thru iweb apis in brew doc ... but the info given is not clear.. pls give me in detail info abt IWEB_GetResponse... and why do we use Callback_Init() before IWEB_Getresponse function..

Hi shiny,
Hundreds of threads on IWeb topic.
Search the forum and u will find the source code too
Good Luck....!

Hi shiny,
Hundreds of threads on IWeb topic.
Search the forum and u will find the source code too
Good Luck....!

Thank u Abhimanyu!

Thank u Abhimanyu!

Thank you Abhimanyu!

Thank you Abhimanyu!

case EVT_APP_START:
nErr=ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_WEB,(void **)&pMe->pIWeb);
cpszUrl =(char*)MALLOC(100 * sizeof(char));
//pMe->pcb= DisplayOutput(pMe);
STRCPY(cpszUrl,(char*)"http://www.qualcomm.com");
//if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_WEB,(void **)&pMe->pIWeb) != SUCCESS)
// return FALSE;
if ( pMe->pIWeb)
{
CALLBACK_Init(&pMe->pcb, Webb_GotResp , pMe);
IWEB_GetResponse(pMe->pIWeb, (pMe->pIWeb, &pMe->ppiwresp, &pMe->pcb, cpszUrl,WEBOPT_END));
}
else
{
ISHELL_LoadResString(pMe->a.m_pIShell,WEBB_RES_FILE,
IDS_STRING1, szBuf, sizeof (szBuf));
IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf,-1,10,10,0,0);
IDISPLAY_Update( pMe->a.m_pIDisplay);
}
static void Webb_GotResp( webb * pMe)
{
WebRespInfo * pWebRespInfo = IWEBRESP_GetInfo(pMe->pIWeb);
ISource* pISource = pWebRespInfo->pisMessage;
// body may be NULL
if ((ISource *)0 != pWebRespInfo->pisMessage)
{
ISourceUtil *pisu;
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_SOURCEUTIL,(void **)&pisu);
if ((ISourceUtil *)0 != pisu)
{
ISOURCEUTIL_GetLineFromSource(pisu, pWebRespInfo->pisMessage, 1100,&pMe->pIGetLine);
ISOURCEUTIL_Release(pisu);

}
}
can anybody let me know wat is the error in the above code snippet??

case EVT_APP_START:
nErr=ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_WEB,(void **)&pMe->pIWeb);
cpszUrl =(char*)MALLOC(100 * sizeof(char));
//pMe->pcb= DisplayOutput(pMe);
STRCPY(cpszUrl,(char*)"http://www.qualcomm.com");
//if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_WEB,(void **)&pMe->pIWeb) != SUCCESS)
// return FALSE;
if ( pMe->pIWeb)
{
CALLBACK_Init(&pMe->pcb, Webb_GotResp , pMe);
IWEB_GetResponse(pMe->pIWeb, (pMe->pIWeb, &pMe->ppiwresp, &pMe->pcb, cpszUrl,WEBOPT_END));
}
else
{
ISHELL_LoadResString(pMe->a.m_pIShell,WEBB_RES_FILE,
IDS_STRING1, szBuf, sizeof (szBuf));
IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf,-1,10,10,0,0);
IDISPLAY_Update( pMe->a.m_pIDisplay);
}
static void Webb_GotResp( webb * pMe)
{
WebRespInfo * pWebRespInfo = IWEBRESP_GetInfo(pMe->pIWeb);
ISource* pISource = pWebRespInfo->pisMessage;
// body may be NULL
if ((ISource *)0 != pWebRespInfo->pisMessage)
{
ISourceUtil *pisu;
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_SOURCEUTIL,(void **)&pisu);
if ((ISourceUtil *)0 != pisu)
{
ISOURCEUTIL_GetLineFromSource(pisu, pWebRespInfo->pisMessage, 1100,&pMe->pIGetLine);
ISOURCEUTIL_Release(pisu);

}
}
can anybody let me know wat is the error in the above code snippet??

here i have attached da program files.c and .h which show how to fetch an image from url using iweb
and further if u dint understand any thing lemme know

here i have attached da program files.c and .h which show how to fetch an image from url using iweb
and further if u dint understand any thing lemme know

Hi Manju,
i tried running it on emulator.. but it was showing a loading icon only...

Hi Manju,
i tried running it on emulator.. but it was showing a loading icon only...

shiny wrote:Hi Manju,
i tried running it on emulator.. but i was showing a loading icon only...
Hi Shiny,
It happens when your mif directory path is wrong.
Study "Troubleshooting BREW" section in "BREW SDK User Docs"
This section has good information about the problems you encounter while development, reasons and the solutions.
Good Luck..!

shiny wrote:Hi Manju,
i tried running it on emulator.. but i was showing a loading icon only...
Hi Shiny,
It happens when your mif directory path is wrong.
Study "Troubleshooting BREW" section in "BREW SDK User Docs"
This section has good information about the problems you encounter while development, reasons and the solutions.
Good Luck..!

i checked it , the path given is right.... by the way i dint find trouble shooting section in user Docs.

i checked it , the path given is right.... by the way i dint find trouble shooting section in user Docs.

dude copy da source code into ur newly created project space and check it out, and do make da necessary changes.

dude copy da source code into ur newly created project space and check it out, and do make da necessary changes.

shiny wrote:i checked it , the path given is right.... by the way i dint find trouble shooting section in user Docs.
If you have BREW 2.1 then go to BREWSDK\Docs-->BREWSDKUser'sGuide.pdf-->Check Appendix B Section-->Emulator Messages
If you have BREW 3.x then go to BREWSDK\Docs-->BREWSDKUser'sGuide.chm-->Troubleshooting BREW Section-->Simulator Messages
Good Luck....!

shiny wrote:i checked it , the path given is right.... by the way i dint find trouble shooting section in user Docs.
If you have BREW 2.1 then go to BREWSDK\Docs-->BREWSDKUser'sGuide.pdf-->Check Appendix B Section-->Emulator Messages
If you have BREW 3.x then go to BREWSDK\Docs-->BREWSDKUser'sGuide.chm-->Troubleshooting BREW Section-->Simulator Messages
Good Luck....!

Hi,
hav copied the source code properly.. hv made the changes accordingly... i tried changing the device too.. its still showing only the loading image.. when i tried debugging it, it entered the web status function...got stuck in WEBS_GETHOSTBYNAME: option... from there it enters assembly code...

Hi,
hav copied the source code properly.. hv made the changes accordingly... i tried changing the device too.. its still showing only the loading image.. when i tried debugging it, it entered the web status function...got stuck in WEBS_GETHOSTBYNAME: option... from there it enters assembly code...