[vorbis] problem with Vorbis DLL's

Lance Paine lancep at radiopie.com
Tue Feb 12 19:34:34 PST 2002



Make sure that your build settings are set to "Multithreaded DLL" or
"Multithreaded Debug DLL"

----- Original Message -----
From: "Brent Phillips" <brent at lyrastudios.com>
To: <vorbis at xiph.org>
Sent: Wednesday, February 13, 2002 1:54 PM
Subject: [vorbis] problem with Vorbis DLL's

<p>> 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"));
>
> sprintf(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!
>
>
> thanks!
>
> Brent
>
>
> --- >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.

<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