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);
}