티스토리 툴바


IT etc../VC++2011/11/02 10:01

    while((unsigned long)fPtr+10000 <= dwPostDataLen)
        {
            AfxMessageBox("0");
            httpFile->Write(&szPostData[fPtr], 10000);  -> 에러 발생 부분
            AfxMessageBox("1");
            fPtr += 10000;
            Sleep(5);
            ptr->m_progressCurPercent.SetPos(progCnt++);
            //CString tmp = "";
            //tmp.Format("%d  %d", fPtr,dwPostDataLen);
            //AfxMessageBox(tmp);
        }

아래 구문을 적용하여 에러를 찾아냈다.


try
{
.........
}
catch(CInternetException* pEx)
{
    TCHAR szErrorMsg[255];
    CString strErrLog;
    pEx->GetErrorMessage(szErrorMsg, 255);
    strErrLog.Format("Error (CInternetException) [%d] : ", pEx->m_dwError);
    strErrLog = strErrLog + szErrorMsg;
    strErrLog = strErrLog + _T(" ");
    OutputDebugString(strErrLog);

}


try

{

//....

}

catch (Exception^ e)
{
    MessageBox::Show(e->Message);
}
Posted by 김달풍