| Thanks Pete for your help...
Using the LoadLibrary to load the DLL sure works fine but to call a
"yet-to-know" function in the .DLL using a function pointer with a N
number of "yet-to-know" parameters is a bit of a problem. Correct me if
I am wrong because you'll need to define a "template" of the function
pointer (with the correct number of parameters to be passed-in) before
you are able to call the function. Consider this scenario:
I have an interpreter ABC (written in Visual C++) which accepts the
following source:-
external function ExecuteMe(X As Integer, Y As Integer) As Boolean in
library "TryMe.DLL".
external function AnotherEg() As Void in library "TryMe.DLL".
action main
do x = ExecuteMe(1,2)
and do AnotherEg()
end.
... as expected, the ABC interpreter will call the functions in
TryMe.DLL. The problem now lies in the fact that I need to declare a
"template" of the function pointer for each of the "unknown" functions
(unknown during compile time of the ABC interpreter) and call these
functions during the execution of the program written specifically for
ABC.
Hope you can supply me with some sample code. Thanks again for your
advice.
|