Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What might prevent a DLL from loading with LoadLibrary?

I have a JD Edwards business function, which is written in Microsoft Visual C++ as a C module. I'm using LoadLibrary to access a third party DLL. In a standalone test program, the code runs just fine. When I run it from within JDE, LoadLibrary returns NULL and GetLastError returns 126, which means The specified module could not be found according to MSDN. I've tried putting in the full path to the DLL, and yes I've remembered to double up the \ characters in the path. No difference.

I've checked to make sure there are no dependencies that would keep the DLL from loading; DUMPBIN /DEPENDENTS returns the following:

WSOCK32.dll
USER32.dll
GDI32.dll
WINSPOOL.DRV
ADVAPI32.dll
KERNEL32.dll

These look like standard Windows DLLs, so I'm at a loss.

like image 957
Mark Ransom Avatar asked May 08 '09 22:05

Mark Ransom


1 Answers

A missing dependency? Have you checked with Dependency Walker that all referenced libraries are found?

like image 134
Dirk Vollmar Avatar answered Sep 21 '22 09:09

Dirk Vollmar