Changes the seek pointer to a new location relative to the beginning of the stream, to the end of the stream, or to the current seek pointer.
HRESULT Seek(
LARGE_INTEGER dlibMove, |
//Offset relative to dwOrigin |
DWORD dwOrigin, |
//Specifies the origin for the offset |
ULARGE_INTEGER * plibNewPosition |
//Pointer to location containing new seek pointer |
); |
Parameters
Return Values
Remarks
IStream::Seek changes the seek pointer so subsequent reads and writes can take place at a different location in the stream object. It is an error to seek before the beginning of the stream. It is not, however, an error to seek past the end of the stream. Seeking past the end of the stream is useful for subsequent writes, as the stream will at that time be extended to the seek position immediately before the write is done.
You can also use this method to obtain the current value of the seek pointer by calling this method with the dwOrigin parameter set to STREAM_SEEK_CUR and the dlibMove parameter set to 0 so the seek pointer is not changed. The current seek pointer is returned in the plibNewPosition parameter.
See Also
IStream - Compound File Implementation, STREAM_SEEK, IStream::Read, IStream::Write