@AProgrammer:你的问题有两个答案.首先,链接器将知道要调用哪个序号.创建库时,此信息将保存在.lib文件中.否则,正如@ c-smile所指出的,您可以使用GetProcAddress来查找函数并调用它.
int ordinal = xxx;
functor = (MyFunctorType) GetProcAddress(hMod, (LPCSTR) ordinal);
if (functor)
{
functor(...);
}
Run Code Online (Sandbox Code Playgroud)
@DriverBoy:是的,这意味着.DLL中的导出符号不能超过65536个.