wiki.icculus.org
[ front page | index | search | recent changes | git repo | offline html ]

MOJOELF_dlopen_file

Dynamically load an ELF binary from a path on the filesystem.

Header File

Defined in <mojoelf.h>

Syntax

void * MOJOELF_dlopen_file(const char *fname, const MOJOELF_Callbacks *cb);

Function Parameters

const char * fname the path to the file to load on the filesystem.
const MOJOELF_Callbacks * cb callbacks that manage how the ELF loader operates. May be NULL, and any function pointer in the struct may also individually be NULL.

Return Value

(void *) Returns a non-NULL pointer on success, NULL on failure. On failure, a human-readable error message may be obtained by calling MOJOELF_dlerror().

Remarks

This is a convenience function that allocates a temporary memory buffer, loads fname into it, calls MOJOELF_dlopen_mem(), and then frees the temporary buffer.

All the same information in that function's documentation applies here.

Thread Safety

this function is not thread-safe.

Version

This function is available since MojoELF 1.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryMojoELF


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.