WUT  0.1
Wii U Toolchain
Typedefs | Functions
Dynamic Loading

Typedefs

typedef void * OSDynLoadModule
 
typedef int(* OSDynLoadAllocFn) (int size, int align, void **outAddr)
 
typedef void(* OSDynLoadFreeFn) (void *addr)
 

Functions

int32_t OSDynLoad_SetAllocator (OSDynLoadAllocFn allocFn, OSDynLoadFreeFn freeFn)
 
int32_t OSDynLoad_GetAllocator (OSDynLoadAllocFn *outAllocFn, OSDynLoadFreeFn *outFreeFn)
 
int32_t OSDynLoad_Acquire (char const *name, OSDynLoadModule *outModule)
 
int32_t OSDynLoad_FindExport (OSDynLoadModule module, int32_t isData, char const *name, void **outAddr)
 
void OSDynLoad_Release (OSDynLoadModule module)
 

Detailed Description

Typedef Documentation

typedef void* OSDynLoadModule

Definition at line 16 of file dynload.h.

typedef int(* OSDynLoadAllocFn) (int size, int align, void **outAddr)

Definition at line 18 of file dynload.h.

typedef void(* OSDynLoadFreeFn) (void *addr)

Definition at line 19 of file dynload.h.

Function Documentation

int32_t OSDynLoad_SetAllocator ( OSDynLoadAllocFn  allocFn,
OSDynLoadFreeFn  freeFn 
)

Set the allocator function to use for dynamic loading.

int32_t OSDynLoad_GetAllocator ( OSDynLoadAllocFn outAllocFn,
OSDynLoadFreeFn outFreeFn 
)

Get the allocator function used for dynamic loading.

int32_t OSDynLoad_Acquire ( char const *  name,
OSDynLoadModule outModule 
)

Load a module.

If the module is already loaded, increase reference count. Similar to LoadLibrary on Windows.

int32_t OSDynLoad_FindExport ( OSDynLoadModule  module,
int32_t  isData,
char const *  name,
void **  outAddr 
)

Retrieve the address of a function or data export from a module.

Similar to GetProcAddress on Windows.

void OSDynLoad_Release ( OSDynLoadModule  module)

Free a module handle returned from OSDynLoad_Acquire.

Will decrease reference count and only unload the module if count reaches 0. Similar to FreeLibrary on Windows.