我一直在尝试使用GetProcAddress
来自 kernel32.dll 的几个函数。它工作正常,除了“OutputDebugString”函数。
我的代码:
typedef void(WINAPI *LPGETNUMBER)(LPCTSTR);
int main() {
const LPGETNUMBER pAddr = (LPGETNUMBER)GetProcAddress(GetModuleHandle((LPCSTR)("kernel32.dll")), "OutputDebugString");
if (NULL == pAddr) {
int32_t nLastErrorCode = GetLastError();
}
}
没有这样的功能。导出被命名为OutputDebugStringA
和OutputDebugStringW
。
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363362
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句