DLL not found in .EXE path

0

I've written a .dll wrapper in c++ that uses the API of an old customer .dll, which then gets used by a program written in VB. It all works perfectly fine, but on some machines for some reason I don't understand I get an "DLL not found exception" (0x80070035) even though all DLLs are in the .EXE startup path. It works on my machine, it works on some other machines as well, but then on yet another I get the exception, even though all are running Win7 x64.

Copying my DLLs inot System32 doesn't resolve the issue, and to be honest I'm out of ideas.

Thanks in advance!

c++
vb.net
dll
asked on Stack Overflow Sep 13, 2016 by afi70

1 Answer

2

I'll bet that the DLL which is not found is not your DLL, but some other DLL which it links to. Run your copy of depends.exe (*), load your DLL into that, and see which DLLs it links to. There will be a surprisingly large number, and the customer sites with problems will be missing one of them.

(Just to add to the fun, it could be that your DLL links to a second DLL which needs a third DLL - and it is that third DLL which is missing.)

*: You have got a copy of depends.exe haven't you? It's an absolutely essential tool for debugging all sorts of problems.


User contributions licensed under CC BY-SA 3.0