Using function pointers for call functions in a DLL

Is it possible to dynamically call a function in a DLL without using function pointers.

+3
source share
3 answers

Yes, sort of, depending on what you are trying to accomplish. For at least some purposes, the linker switch delayloadcan have roughly the effect of explicit dynamic linking, without requiring you to define pointers to all the functions you intend to use, use them GetProcAddressto assign values ​​to these pointers, etc.

+4
source
+3

No, you will always need function pointers.

But why don't you make a packing class with one method for each function in the DLL that you want to call and process the pointer material in the class. This way you hide the index material for the rest of your application.

+1
source

Source: https://habr.com/ru/post/1749439/


All Articles