我在一个 dll 文件中有一个函数指针(在实现中,而不是头文件中)。在exe源码中如何调用this指针指向的函数?
最佳答案
您可以导出返回指针的函数。 header :
typedef void ( *MyPtr ) ();
__declspec( dllexport ) MyPtr GetMyPtr();
来源:
MyPtr GetMyPtr()
{
//retunr the function pointer here
}
关于c - 从 dll 导出函数指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7764074/