This topic has been updated for Visual Studio 2005 SP1.
Call this member function to reposition the pointer in a previously opened file.
Offset in bytes to move the read/write pointer in the file.
Relative reference for the offset. Must be one of the following values:
CFile::begin Move the file pointer lOff bytes forward from the beginning of the file.
CFile::current Move the file pointer lOff bytes from the current position in the file.
CFile::end Move the file pointer lOff bytes from the end of the file. lOff must be negative to seek into the existing file; positive values will seek past the end of the file.
The new byte offset from the beginning of the file if the requested position is legal; otherwise, the value is undefined and a CInternetException object is thrown.
The Seek function permits random access to a file's contents by moving the pointer a specified amount, absolutely or relatively. No data is actually read during the seek.
At this time, a call to this member function is only supported for data associated with CHttpFile objects. It is not supported for FTP or gopher requests. If you call Seek for one of these unsupported services, it will pass back you to the Win32 error code ERROR_INTERNET_INVALID_OPERATION.
When a file is opened, the file pointer is at offset 0, the beginning of the file.
Using Seek may cause an implicit call to Flush.