url encode problem | developer.brewmp.com url encode problem | developer.brewmp.com

Developer

url encode problem

Forums:

hi,
It seems i have a problem with IWEBUTIL_UrlEncode.
The following code return nothing instead of "id=5".
What is my error?

int pnInLen=4;
int pnOutLen=10;
char *pcOut=(char*) MALLOC(10);
char *cpcIn=(char*)MALLOC(4);
STRCPY(cpcIn,"id=5");

if (ISHELL_CreateInstance(pMe->m_pIShell, AEECLSID_WEB, (void **)(&pIWebUtil)) != SUCCESS)
return;

IWEBUTIL_UrlEncode(pIWebUtil,cpcIn,&pnInLen,pcOut,&pnOutLen );
DBGPRINTF(pcOut);

Thanks in advance

i found the problem.
i used (by mistake) AEECLSID_WEB instead of AEECLSID_WEBUTIL

i found the problem.
i used (by mistake) AEECLSID_WEB instead of AEECLSID_WEBUTIL