|
>> Check the return value for GetLastError after the call GetLastError returns 127. For interest, the code looks like this: HMODULE hMod = ::LoadLibrary(strIupDLL); if (!hMod) { DWORD dwError = ::GetLastError(); .... } dwError gets set to 127. Incidentally, I said there was nothing obviously wrong when I look at IupLua53.dll in Dependencies. That’s not right. There are list of Modules in the bottom pane. I presume this is a list of linked modules from IupLua53.dll. The first two are iup.dll and lua53.dll and the value shown in the ‘Checksum’ column for both of these is “0x00000000 (incorrect)”. Unless I’m missing something, it seems like I must have either copied the wrong dlls into the folder, or there’s something wrong with the way iuplua53.dll was built. As far as I can see, you only need 3 files to replicate this: · lua53.dll (from lua-5.3.5_Win32_dll15_lib.zip) · iup.dll (from iup-3.26_Win32_dll15_lib.zip) · iuplua53.dll (from iup-3.26-Lua53_Win32_dll15_lib.zip) It seems like if you put those 3 dlls into a folder and call LoadLibrary on iuplua53.dll (in a MSVC 2017 environment), it should load. But it doesn’t. If you then open iuplua53.dll in the Dependencies application, you should see the ‘incorrect’ checksums. I tried seeing what happens if you try to load lua53.dll and iup.dll. It turns out that they each load fine. It’s just iuplua53.dll that doesn’t. Simon From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Antonio Scuri > Does that look right? i.e. IM, CD and IUP have an extra set of Lua5.3-related dlls that have to be added in separately; and Lua and Luagl don’t. Correct? Yes. > But I also need to call a couple of functions in iuplua53.dll (specifically iuplua_open and iuplua_close). And that is not working. When I call ::LoadLibrary for iuplua53.dll, the call fails (returns NULL). Check the return value for GetLastError after the call, it may lead you to what's going on. Best, Scuri |