Export function pointer from dll

I have a pointer to a function in a DLL file (in the implementation, not in the header). How can I call the function indicated by this pointer in the exe source code?

+1
source share
1 answer

you can export a function that returns a pointer. Title:

typedef void ( *MyPtr ) ();

__declspec( dllexport ) MyPtr GetMyPtr();

Source:

MyPtr GetMyPtr()
{
  //retunr the function pointer here
}
+2
source

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


All Articles