[vorbis-dev] Proposed header file changes to allow for dynamic linking of DLLs at runtime

John Lundy jlundy at playnet.com
Sat Feb 16 17:12:48 PST 2002


Sorry for the attachment, but I do not know of another way to communicate
the details of my proposed changes to the dev team.

While writing RipTrax (a ripper + encoder program), I wanted to make all
encoder DLLs dynamically linkable at runtime. I first check for the
existence of the dll, open the library with Load Library and then do a
GetProcAddress for each routine I plan to use. With the original header
files, this was not possible. So I undertook to modify the headers I needed
to provide the desired functionality.

The enclosed headers provide two new aspects: 1) the selection of a either
the standard LIB linkage process or the use of LoadLibrary/GetProcAddress
usage via a #define in the main code (search for _OGGLIB, _VORBISLIB and
_VORBISENCLIB), and 2) added MS specific #pragma pack statements to allow
for fixed structure element alignment seperate to my projects desired
structure element alignment. If you have questions, I'd be glad to field
them.

One further note, header file naming conventions. All ogg_ prefixed
functions are in ogg.h, all vorbis_ prefixed functions are in vorbis.h and
all vorbisenc_ prefixed functions are in codec.h (note the differenct and
discontinuity?).

All together, nice job folks. I hope these changes can make it into the code
in the next version. It would greatly help to not have to *fix* the header
files so that this dynamic/runtime functionality is available.

John

<p>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg.zip
Type: application/x-zip-compressed
Size: 6031 bytes
Desc: ogg.zip
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20020216/42468b65/ogg.bin


More information about the Vorbis-dev mailing list