| DevIL Documentation | Home | Previous | Next |
The ilSetWrite function changes the file writing functions used by OpenIL.
ILvoid ilSetWrite(
fOpenWProc Open,
fCloseWProc Close,
fPutcProc Putc,
fSeekWProc Seek,
fTellWProc Tell
fWriteProc Write
);
ilSetWrite was primarily designed to allow languages other than C/C++ access to OpenIL's robust file-writing functions, since other languages do not use stdio.h's FILE* struct. This function can also double usefully in instances where filetypes other than FILE* are used, such as Windows file handles and C++ istreams. Simply provide an alternative to each of the functions needed by OpenIL. The "special" datatype ILHANDLE is passed to these functions when used, so any internal datatype used by the differing language (or file handle) can be used.
None
ilResetWrite, ilSetRead, ilResetWrite