Sorry for bad English. This is a computer translation from Russian language.
I want to load the DLL library. I use script:
external "kernel32.dll" int LoadLibraryA(string);
external "kernel32.dll" FreeLibrary(int);
external "kernel32.dll" int GetLastError();
var hDll = LoadLibraryA("magic.dll");
Game.Msg(GetLastError());
FreeLibrary(hDll);
Game.Msg(GetLastError());
But "LoadLibrary" return error 2 - ERROR_FILE_NOT_FOUND, or 126 - ERROR_MOD_NOT_FOUND.
I placed the dll in the folders: system32, WME folder, project folder, data folder. I used the absolute and relative path. But in all cases I get an error.
library, of course, working, I took her here
astralax.ru.
Working example of the developer (executable only, dll present)
http://letitbit.net/download/0990.02a8ad5bcd8c88c3a093bfa61/demo.zip.htmlExample with source code in C++ (without visualization, dll present)
http://www.astralax.ru/hlam/LoadLibraryTest.rarWhy can not load library? When I change magic.dll, for example, kernel32.dll, LoadLibrary returns 0 - ERROR_SUCCESS
Thank you for your help!