CdReadFile

Reads a data file from the CD-ROM

int CdReadFile (
        char *file,
        u_long *addr,
        int nbyte
)

Arguments

file Filename
addr Pointer to result memory buffer
nbyte Number of bytes to read

Return Value

The number of bytes read is returned if the function was successful.
0 is returned in case of an error.

Explanation

nbyte bytes of the file specified by file are read from the CD-ROM and placed in the buffer pointed to by addr.
If nbyte is set to 0, the entire file is read.
If file is set to NULL, the function starts reading at the last location read by the previous call.

Notes

The filename must be specified as an absolute path with lower case characters automatically converted to upper case.
Reading is performed in the background, so CdReadSync() should be used to determine when reading has completed.