#include <cafe/os/OSDynLoad.h> int OSDynLoad_Acquire(char const * apBaseModuleName, OSDynLoad_ModuleHandle * apRetHandle);
Base module name (no path or extension) to load. If the module is already loaded, it is not loaded again, and a handle to the existing module is returned.
If the module's base file name (not including its extension) includes a "
|apRetHandle||Pointer to the handle variable to receive the handle to the loaded module This handle value is used in other
OSDYNLOAD_ERR_xxx error code (see
The following table lists the most common errors that might be returned.
||Tried to load
||Ensure that the file is in the expected location. If you do not need that file, you may ignore the error.|
||Module not found because path to file is not valid.||Ensure that the file is in the expected location. If you do not need that file, you may ignore the error.|
||Module not found.||Ensure that the file is in the expected location. If you do not need that file, you may ignore the error.|
||Module not found because the size of the file is not valid.|
||Module not found because disc was ejected.||Reinsert the disc.|
||Module not loaded after a reasonable length of time.||Reboot console.|
0) is never a valid handle value. If the function fails, the
return handle value will always be set to
0 unless the pointer to the handle
itself is not a valid pointer.
This function is the main RPL loader function. The function takes the base module name to load, and returns a handle to the loaded module.
Loading of dependencies is automatic. If one RPL implicitly uses another RPL as a result of linking to an import library, then the dependency is automatically loaded at the same time.
Loading of RPLs consumes memory from 3 heaps: the System heap (for tracking structures),
the loader heap for code, import and export sections, and the heap currently associated
OSDynLoad_GetAllocator (normally the default heap) for RPL DATA, BSS and RODATA.
Loading many RPLs can quickly exhaust the System heap.
The System heap can be increased with the makerpl tool's
OSDynLoad_Acquire can be called on any core.
The acquired RPL can be used on any core.
The loader will load the RPL using the CPU core
which calls the
2014/02/27 Note that a file name with a "
." must include the extension.
2013/05/08 Automated cleanup pass.
2011/03/11 Initial version.