GetProcAddress,错误 127 (ERROR_PROC_NOT_FOUND)
我正在尝试调用 DLL 中定义的函数,记录如下:
http://xiph。 org/vorbis/doc/vorbisfile/ov_fopen.html
LoadLibraryA 成功,并且 GetProcAddress 似乎为我尝试过的每个其他函数返回有效地址。这里它返回 NULL,GetLastError() 返回 127 (ERROR_PROC_NOT_FOUND)。
const char* dllName = "libvorbisfile.dll";
mhDll = LoadLibraryA(dllName);
typedef int (__cdecl *OV_FOPEN)(char*, OggVorbis_File*);
OV_FOPEN ProcFOpen = (OV_FOPEN) GetProcAddress(mhDll, "ov_fopen");
我能做些什么?
I am trying to call a function defined in a DLL, documented here:
http://xiph.org/vorbis/doc/vorbisfile/ov_fopen.html
LoadLibraryA is successful and GetProcAddress seems to return a valid address for every other function I've tried it with. Here it returns NULL here and GetLastError() returns 127 (ERROR_PROC_NOT_FOUND).
const char* dllName = "libvorbisfile.dll";
mhDll = LoadLibraryA(dllName);
typedef int (__cdecl *OV_FOPEN)(char*, OggVorbis_File*);
OV_FOPEN ProcFOpen = (OV_FOPEN) GetProcAddress(mhDll, "ov_fopen");
What can I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据此讨论线程,libvorbisfile的某些版本。 dll 缺少 ov_fopen。
According to this discussion thread, some versions of libvorbisfile.dll are missing ov_fopen.
使用 Depends 检查 DLL,并找出找不到该函数的原因。可能只是文档中的名称错误,或者存在名称损坏问题。
Examine the DLL with Depends and find out why you can't find the function. It's probably either just the name is wrong in the documentation or there's a name mangling issue.