|
Loads a file into memory.
returns a pointer to the allocated memory and the size of the file
If the file could not be loaded a NULL is returned
This file can be also treated as a string (there will always be a terminating NULL ).
Example:
int file_size;
char *buff=(char *)STATE_utilities_file_to_memory("help.txt", &file_size);
MessageBox(NULL,buff,"Help", MB_OK);
STATE_utilities_free_file_memory(buff);
|