|PathEngine home||previous: ||next: |
Loads a file, allocating a buffer.
char* loadBinary(const char* filename, uint32_t& buffer_size);
|filename||A C string with the name of the file to open.|
On success, this will be set to the length in bytes of the buffer created.|
On failure, this will be set to zero.
If the call is successful then a pointer to a buffer containing the contents of the file is returned.
This buffer is dynamically allocated internally, and must be freed by calling
delete must not be called on this buffer because it is not allocated on the local heap.
If the call fails then a null pointer is returned.
If no path is specified then the testbed's working directory will be searched.
This will be the directory the testbed was run from.
A relative or absolute path may be specified as part of the filename.
Relative paths will interpreted as relative to the testbed's working directory.
Files are loaded in binary mode.
This buffer pointer and size obtained from the method can be subsequently passed
into a load function such as
In the case of a NonFatal error, such as failure to open the file, the error is reported before returning (with a return value of zero and size set to zero).
|Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEngine||next: |