CNTSeek

Syntax


#include <revolution/cnt.h>

s32 CNTSeek(CNTFileInfo* cf, s32 offset, u32 whence);

Arguments

cf Pointer to the CNTFileInfo structure.
offset Offset value. Units are bytes. Must be a multiple of 4.
whence Specifies the seek base position.
CNT_SEEK_SET Start of file.
CNT_SEEK_CUR Current position of file.
CNT_SEEK_END End of file.

Return Values

Returns CNT_RESULT_OK when the process ends normally. Returns CNT_RESULT_INVALID if a parameter is supplied that indicates a position not in the file, or if a value other than those listed above is supplied as the value of whence.

Description

Moves the start location for loading the file.

See Also

CNTOpen, CNTRead

Revision History

2006/12/04 Added result code descriptions.
2006/09/20 Added a description about the restrictions when specifying offset.
2006/08/15 Initial version.


CONFIDENTIAL