Seeking to a New Position in a File

[The feature associated with this page, Multimedia File I/O, is a legacy feature. It has been superseded by Source Reader. Source Reader has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader instead of Multimedia File I/O, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The following example moves to the beginning of an open file using the mmioSeek function.

mmioSeek(hFile, 0L, SEEK_SET); 

The following example moves to the end of an open file.

mmioSeek(hFile, 0L, SEEK_END); 

The following example moves to a position 10 bytes from the end of an open file.

mmioSeek(hFile, -10L, SEEK_END);