Dear all,
I am new to Tek-tips member.
i have a small problem with file reading from internet.
i have a web site and i uploaded a DAT file this DAT file record some data from user. peoblem is this i create tool for direct access my dat file but its doesn't work only html file is display.
my i did like this...
-------------------------------------------
void CHtmlViewDlg:isplayData(CString strUrl)
{
BeginWaitCursor();
CInternetSession session;
CInternetFile* pFile=(CInternetFile*)session.OpenURL(strUrl);
if(pFile)
{
CString strData;
CString totalData;
pFile->SetReadBufferSize(4096);
while(pFile->ReadString(strData))
{
totalData=totalData+strData+"\r\n";
}
EndWaitCursor();
SetDlgItemText(IDC_DATA,totalData);
pFile->Close();
}
}
how can is a read my Dat file and other file please help.
I am new to Tek-tips member.
i have a small problem with file reading from internet.
i have a web site and i uploaded a DAT file this DAT file record some data from user. peoblem is this i create tool for direct access my dat file but its doesn't work only html file is display.
my i did like this...
-------------------------------------------
void CHtmlViewDlg:isplayData(CString strUrl)
{
BeginWaitCursor();
CInternetSession session;
CInternetFile* pFile=(CInternetFile*)session.OpenURL(strUrl);
if(pFile)
{
CString strData;
CString totalData;
pFile->SetReadBufferSize(4096);
while(pFile->ReadString(strData))
{
totalData=totalData+strData+"\r\n";
}
EndWaitCursor();
SetDlgItemText(IDC_DATA,totalData);
pFile->Close();
}
}
how can is a read my Dat file and other file please help.