lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

Roberto Ierusalimschy wrote:
> You can make these corrections in luaconf.h:
> 
> #if defined(loadlib_c) && defined(UNICODE)
> 
> #define GetModuleFileName	GetModuleFileNameA
> #define FormatMessage		FormatMessageA
> #define LoadLibrary		LoadLibraryA
> 
> #endif

I doubt this will work. Because <windows.h> is included after
"luaconf.h" and because GetModuleFileName and the other variant
API calls _are_ already macros. The Windows system DLLs only
provide the *A/*W symbols.

I've checked the oldest Win95 kernel32.dll I could find and it
has both variants for all relevant symbols. I still think it
makes sense to directly use the *A variants in loadlib.c (but see
http://lua-users.org/lists/lua-l/2006-04/msg00466.html for Wim's
position on this).

Bye,
     Mike