CInternetFile::Seek

virtual LONG Seek( LONG lOffset, UINT nFrom );
throw ( CInternetException );

Return Value

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.

Parameters

lOffset

Offset in bytes to move the read/write pointer in the file.

nFrom

Relative reference for the offset. Must be one of the following values:

Remarks

Call this member function to reposition the pointer in a previously opened file. 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.

Note Using Seek may cause an implicit call to Flush.

CInternetFile OverviewClass MembersHierarchy Chart