Search code examples
c++dllogg

GetProcAddress, Error 127 (ERROR_PROC_NOT_FOUND)


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?


Solution

  • According to this discussion thread, some versions of libvorbisfile.dll are missing ov_fopen.