John Lundy
2002-Feb-16 17:12 UTC
[vorbis-dev] Proposed header file changes to allow for dynamic linking of DLLs at runtime
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-0001.bin
Chris Wolf
2002-Feb-22 06:31 UTC
[vorbis-dev] Proposed header file changes to allow for dynamic linking of DLLs at runtime
--- John Lundy <jlundy@playnet.com> wrote:> 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.Why? What exactly is the problem you're having? <p><p>> 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<p>You should be able to use runtime linking the way the DLL's are currently implemented. -Chris <p><p>__________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com --- >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-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.