Force use of ANSI versions of Windows API's for runtime+loading of DLL's, causing problems when building with UNICODE defined.
Originally committed to SVN as r2815.
This commit is contained in:
parent
cc26be476e
commit
b6ae30cc6c
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ static void pusherror(lua_State *L)
|
|||
{
|
||||
int error=GetLastError();
|
||||
char buffer[128];
|
||||
if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, error, 0, buffer, sizeof(buffer), 0))
|
||||
lua_pushstring(L,buffer);
|
||||
else
|
||||
|
@ -107,7 +107,7 @@ static int loadlib(lua_State *L)
|
|||
{
|
||||
const char *path=luaL_checkstring(L,1);
|
||||
const char *init=luaL_checkstring(L,2);
|
||||
HINSTANCE lib=LoadLibrary(path);
|
||||
HINSTANCE lib=LoadLibraryA(path);
|
||||
if (lib!=NULL)
|
||||
{
|
||||
lua_CFunction f=(lua_CFunction) GetProcAddress(lib,init);
|
||||
|
|
Loading…
Reference in a new issue