Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mmioSeek(3mms) — Multimedia Services 2.4B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mmioClose(3mms)

mmioOpen(3mms)

mmioSeek(3mms)  —  Subroutines

 
 
 
 

Name

 
mmioSeek --- Change the current file position in a file
 
 

Syntax

 
 
 

 #include <mme/mme_api.h>
 MMRESULT APIENTRY mmioSeek(HMMIO hmmio,
                           LONG lOffset,
                           LONG iOrigin);
 

 
 
 

Arguments

 
HMMIO hmmio
Specifies the file handle to the file within which to seek.

 
LONG lOffset
Specifies an offset for changing the current position in the file.

 
LONG iOrigin
Specifies how the offset given by the lOffset argument is interpreted.  The following flags are defined:
 
 
 

SEEK_SET
Seeks to lOffset bytes from the beginning of the file. 
 
 
 

SEEK_CUR
Seeks to lOffset bytes from the current file position. 
 
 
 

SEEK_END
Seeks to lOffset bytes from the end of the file. 
 
 
 

Description

 
The mmioSeek function changes the current file position in a file opened with the mmioOpen function.  The current file position is the location in the file where data is read or written. 

 
If seeking to an invalid location in a file, such as past the end of the file, the mmioSeek function might not return an error but subsequent I/O operations can fail.  To locate the end of a file, call the mmioSeek function with the lOffset argument set to zero and the iOrigin argument set to SEEK_END. 
 

Extensions

 
None.
 
 

Return Values

 
Returns a new position specified in bytes, relative to the beginning of the file.  If an error occurs, the return value is -1.
 

See Also

 
 
 
 
 
mmioClose(3mms), mmioOpen(3mms)
 
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026