Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果一个 dll 导出一些函数并且这些函数只有序号,我该如何调用这些函数?
请给我一个简短的例子。
GetProcAddress的文档说明您在参数的低位字中传递整数序数lpProcName。MAKEINTRESOURCE宏实际上可以用来使这更容易一些:
lpProcName
int ordinal = 123; HANDLE dll = LoadLibrary("MyDLL.dll"); FARPROC fn = GetProcAddress(dll, MAKEINTRESOURCE(ordinal));