Previous Topic Index Next Topic
[API function]

FSOUND_OPENCALLBACK

Callback for opening a file.

void * F_CALLBACKAPI FSOUND_OPENCALLBACK(
const char *name
);

Parameters

name This is the filename. You may treat this as you like.

Return Value

On success, return a non 0 number.
On failure, return 0.

Remarks

You MUST open the file and return a handle for future file function calls. Cast the handle to an unsigned int when returning it, then in other callbacks, cast it back from the unsigned int back to your own handle type.
Return 0 signifies an open error. This is very important.
It is a good idea if you are using memory based file routines, to store the size of the file here, as it is needed to support SEEK_END in the seek function, described below.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, GameCube

See Also

FSOUND_CLOSECALLBACK , FSOUND_File_SetCallbacks , FSOUND_READCALLBACK , FSOUND_SEEKCALLBACK , FSOUND_TELLCALLBACK

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:30 2005 by SourceDoc v0.10, the automated source code documenter.