CInternetFile *file;
................
................
file->SeekToBegin(); 不能用

解决方案 »

  1.   

    The MFC class CInternetFile provides a base class for the CHttpFile and CGopherFile file classes. CInternetFile and its derived classes allow access to files on remote systems that use Internet protocols. You never create a CInternetFile object directly. Instead, create an object of one of its derived classes by calling CGopherConnection::OpenFile or CHttpConnection::OpenRequest. You also can create a CInternetFile object by calling CFtpConnection::OpenFile.The CInternetFile member functions Open, LockRange, UnlockRange, and Duplicate are not implemented for CInternetFile. If you call these functions on a CInternetFile object, you will get a CNotSupportedException.
      

  2.   

    你不能直接产生一个CInternetFile对象,应该使用其派生类来产生。
      

  3.   

    CHttpFile也不成呀,我试了CHttpFile *file;
    file=(CInternetFile*)session.OpenURL(......);
    然后利用这个file, file->ReadString后还是不能seek到开始的位置而且我发现定义两个*file,分别获取两个网页,一个会把另一个的部分覆盖掉