Re: [AD] [WIN] dll export file patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Jason Wilkins wrote:

On Wed, 6 Jun 2001, Bob wrote:


That's not what I was refering to. I was talking about having to call allegro_dll_wrapper = LoadLibrary(...) *before* including allegro.h...



That makes no sense, including allegro.h is a compile time action, and

calling LoadLibrary is a run time action.  What are you talking about?


I totally agree, but this comes from Henrik's e-mail:

[quote]
I've shown Eric that this
will work with some macros. (redefine AL_FUNC, AL_VAR using nested macro
etc...) I should perhaps also mention that the import library will disappear
too.

from the head: (warning: might contain syntax errors)

before allegro.h make sure to call allegro_dll_handle = LoadLibrary();

#define AL_FUNC(type, name, args) \
type (*name)(args) = (void*) LoadProcAddress(allegro_dll_handle, \"name\");
\
if(!name) Exit(-99);
[/quote]

Although I think he meant that we should do this inside allegro_init(). However, this woul cause problems for people who shut down Allegro temporarily and re-init it later - we don't want to load the DLL twice.



--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/