我用VC6写了一个ocx控件,中间有这样的一段代码,功能是要打开服务器上的一个文件,这个ocx控件在IE6下运行正常,但是如果机器装了IE7,就会出错,跟踪发现错误出在下面int len = pFile->SeekToEnd();这一句,不知道怎么回事,那位高手帮帮忙!
          CStdioFile *pFile;
CInternetSession InternetSession(ServerPath); if (ServerPath.Right(1) != "/")
ServerPath = ServerPath + "/"; strUrl = ServerPath + strFileName;
TRY
{
pFile = InternetSession.OpenURL(strUrl, 0, INTERNET_FLAG_TRANSFER_BINARY|
INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_AUTO_REDIRECT, NULL, 0);
if (NULL == pFile)
return FALSE;

int len = pFile->SeekToEnd();
pFile->SeekToBegin();
}
CATCH(CInternetException, e)
{
delete pFile;
return NULL;
}END_CATCH