This project has moved and is read-only. For the latest updates, please go here.

Unable to load DLL

Feb 22, 2011 at 6:50 PM


I'm getting an exception when a custom dll is being taken out of memory and I suspect that there's an object not getting disposed of properly. To help try to find this, I downloaded vld 2.0b but am having a problem getting it to work with C++ DLL that's called from a C# project in VS2010 and Win7 32-bit. I added the vld folders to the path, I added the include and lib folders within C++, and everything builds fine. However, when I run the program and try to call a function from the C++ DLL, I get this error:

Unable to load DLL 'LDX.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

LDX.dll is the name of my dll. The dll is in the same folder as the .exe that's trying to call it. I even copied the 2-vld 32-bit dlls to that same folder, with no luck. I'm running the program while logged in as an admin, and even tried disabling UAC, with no luck. If I comment out the #include of the vld.h, or build the solution in release mode, it works fine, so I suspect there's some vld dependency that it can't find but I have no clue what is missing. I tried searching for this, but did not see anything on it.

Can anybody help me get over this hump? Thanks,