[vorbis] problem with Vorbis DLL's

Brent Phillips brent at lyrastudios.com
Tue Feb 12 16:54:21 PST 2002



Hi,

I was wondering if anyone out there had any success dynamically loading the 
Vorbis libraries via LoadLibrary on Win32.  I'm able to use things properly 
by linking in the static libraries, but when I try to load them dynamically 
(which I really need to do), I get an access violation when calling  ov_open.

The code looks something like this...

typedef int (*OVOPEN)(FILE*,OggVorbis_File*,char*,long);
HMODULE				 hVorbisFile;
OVOPEN				 hOvOpen;

hVorbisFile = LoadLibrary(_T("Vorbisfile.DLL"));
hOvOpen = (OVOPEN)GetProcAddress(hVorbisFile, _T("ov_open"));

printf(filename, "music\\Track%02d.OGG", track_number);
vorbis_fd = fopen(filename, _T("rb"));
_setmode( _fileno( vorbis_fd ), _O_BINARY );
if ((hOvOpen)(vorbis_fd, &vf, NULL, 0) < 0) {

then POOF!

<p>thanks!

Brent

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list