Calling libarraies at runtime from C

Calling libarraies at runtime from C

venkat_gopal's picture

i have a requirement..go through it and if u can help
>me out give your ideas.......
>
>i need help to proceed further.This is all about calling functions
> present in a foreign librarry at runtime.
>
>1) i have an application(x) which calls a 'C' function.
>
>2) The purpose of this C function is to call few third party C/C+
>libraries in unix as well as on Windows.
>
>The second point was achieved by using the LoadLibrary and GetProcAddress
>APIs for Windows and dlsym() APIs for Unix.
>
>Some of the function calls to the third party library functions may have
>pointers/pointer to pointer as arguments.So they may have the return values
>in the argument.
>How do i capture it in my program???
>
>The function prototypes are not known to me during compile time.
>Probably, i can develop an user interface through which i can get the
>prototype deteails during runtime as parameters viz.,return type,data type
>of argument and function name etc.,
>
>But even if i get it how do i use this in my program to capture the return
>data from external library??
>
> This interface has to be generic so that i can call any third party
> functions.This is quite urgent.
>
>Can you please help me out????

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.