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

Developer

Forums

Forums:

hi,

i am useing following code to upload .qcp file to the server.

 

ISHELL_CreateInstance( pApp->m_pIShell, AEECLSID_WEB, (void**)&m_pweb);

 

ISHELL_CreateInstance(pApp->m_pIShell, AEECLSID_SOURCEUTIL, (void**)&m_psource_utility);

 

ISHELL_CreateInstance(pApp->piShell,AEECLSID_FILEMGR,(void**)&m_pIFileMgr);

 

m_pIFile=IFILEMGR_OpenFile(m_pIFileMgr,"recorde.qcp",_OFM_READ);

 

ISOURCEUTIL_SourceFromAStream(m_psource_utility,(IAStream*)m_pIFile,&m_pISource);

 

CALLBACK_Init( &(m_paee_callback),gotResponse,pApp->m_pWebCommuniction);

 

                    int i=0;

                    WebOpt aw[11];

                    aw[i].nId=WEBOPT_HANDLERDATA;

                    aw[i].pVal=(void*)pApp->m_pWebCommuniction;

                    i++;

                    aw[i].nId=WEBOPT_METHOD;

                    aw[i].pVal=(void*)"POST";

                    i++;

                    aw[i].nId=WEBOPT_BODY;

                    aw[i].pVal=m_pISource;

                    i++;

                    aw[i].nId=WEBOPT_END;

                    IWEB_AddOpt(m_pweb,aw);

                    IWEB_GetResponse(m_pweb,(m_pweb,&m_pweb_response,&m_paee_callback,URL,                        WEBOPT_CONTENTLENGTH,m_pInfo.dwSize,                        WEBOPT_STATUSHANDLER,gotStatus,                        WEBOPT_CONNECTTIMEOUT,-1,                        WEBOPT_FLAGS,WEBREQUEST_FORCENEWCONN,                        WEBOPT_END));

 

 

if i am sending Text file then sent data successfully convrted in to text file on server side.

but if i am sending QCP file then sent data is not properly converted in to .qcp file on server side.

is it correct way to upload the qcp file.

and if it is not correct  plz show me the correct way to upload qcp file.

Thanks.

 

 

 

Please Reply.......

Please Reply.......