sharedlib
sharedlib copied to clipboard
Typing functions at runtime or calling untyped functions
Since I want to load dynamic libraries manually at runtime, I might also first know about the function types at runtime, so doing it like in the example code, where you cast the functions found by a name functions to a specific function type, won't work. Specifically, I'm working on a scripting language, and want to add support for calling extern functions. This would be the best way to call it. What I basically want is something method, which takes the name and the byte representations of arguments, and returns the byte representation of the return value. Is something like this possible as well? This might also help for calling variadic functions like printf, where I don't know a real dynamic way yet.