none
CHttpFile

    Question

  • Hi,

    I have an issue. If I include wide characters (wchar_t) to the second parameter to CHttpFile::SendRequest() , the subsequent call  to CHttpFile::Read() does not succeed.

    For the wchar_t data , I use casting something as (LPVOID)(LPCTSR)

    Code is something as follows.

    CString p_strHeaders = _T("Content-Type: application/x-www-form-urlencoded\r\n\r\n");

    //.........

    m_pFile1->SendRequest(p_strHeaders,
       (LPVOID)pTotal, dwHeaderSize + dwFileSize + dwFooterSize);

    where pTotal is BYTE*

    m_pFile1->QueryInfoStatusCode(dwStatus);
    nBytesRead = m_pFile1->Read(buffer, MAXBUF - 1); 

    My requirement is to upload file containing wide character data (Japanese characters) to the server. How can I pass wide characters in the second parameters?

    Regards,

    George

    Thursday, March 10, 2011 6:23 AM

Answers

All replies