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

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


Henrik Stokseth wrote:
> 
> Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
[snip]
> 
> 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);
> 
> #define AL_VAR(type, name) \
> type *var_##name = (void*) LoadProcAddress(allegro_dll_handle, \"name\") \
> \#define name *(var_name)
> 

I might be wrong but I always thought that you wern't supposed to
use preprocessor comamnds in '#define's...

-- 
"Computer programmers don't byte, they nybble a bit."
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net/



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