-
Dynamic function call
We have a DLL to which a static library is to be linked. In the static library we have a function that must assemble the function call to one of the DLL functions without having any knowledge of it (the DLL function to be called) EXCEPT the function name and the argument types and values that can be extracted from an XML buffer. So the static library function must assemble dynamically the function call to the DLL function. It can get dynamically the DLL function pointer (this is resolved) but the question is : Can we call a non-typed function call ? Or can we create dynamically a function call type (a function pointer type) based on the parameters and the return value ?
-
Pour commencer, ceci est un forum francophone. Même si beaucoup de gens ici comprennent l'anglais, ce n'est pas le cas de tous.
Sinon si j'ai bien compris, tu a récupérer une fonction d'une librairie dynamique et tu voudrais la lancer. Dans ce cas il faut que tu définisse le bon type au moment ou tu l'extrait pour pouvoir caster le pointeur comme il faut. Si tu peux connaitre le type à l'avance, tant mieux, sinon c'est pas possible. De manière générale quand tu utilise un DLL, tu sais ce qu'il y a dedans et ce que tu va utiliser.