How could I call a function from a DLL?
I tried to declare a void pointer and to store in it the result of GetProcAddress… but didn’t work. I also wanted to declare an unsigned long int (I saw it somewhere on the internet), but then I didn’t know how to continue on. 😀
So, would anybody mind giving me a hand?
Try for something like this.
the method name is where you might be stuck aswell. C++ has name mangling for overloading (even if it’s not overloaded) and that depends on the compiler. You can either work out the mangled name or turn off mangling for the function by using
extern "C". You might use a tool like depends.exe to see all the functions with exact name you would have to use.It is much easier to statically link to the DLL using the (import)lib file in windows.