Logo Search packages:      
Sourcecode: einstein version File versions  Download package

void * ResourceFile::load ( long  offset,
long  packedSize,
long  unpackedSize,
int  level 
) [inherited]

Allocate buffer and load data. Memory returned by this method must be freed by free() function call.

offset offset from start of resource file to packed data
packedSize size of packed resource
unpackedSize size of unpacked resource

Definition at line 249 of file resources.cpp.

    char *outBuf=NULL;
    try {
        outBuf = (char*)malloc(unpackedSize);
        if (! outBuf)
            throw Exception(name + L": Error allocating memory");
        load(outBuf, offset, packedSize, unpackedSize, level);
    } catch (Exception &e) {
        if (outBuf) free(outBuf);
        throw e;
    } catch (...) {
        if (outBuf) free(outBuf);
        throw Exception(name + L": Error loading resource");

    return outBuf;

Generated by  Doxygen 1.6.0   Back to index