Search code examples
c++.net-3.5dllnotfoundexception

System.DLLNotFoundException when the DLL exists


I am getting the following error when we load up a DLL in our program that throws the following error:

Unable to load DLL 'xxx.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

This doesn't make sense to me because the DLL exists and is built into our installer every time we make a change to our code. This DLL has not changed in months and this just started happening about a week ago from our newly installed copies. Any ideas? The project in question is an unmanaged C++ project that gets called from a .NET 3.5 app.


Solution

  • The error isn't saying that the DLL doesn't exist; it's saying that the DLL is missing the procedure call you're trying to make. This most likely means there is another DLL with the same file name earlier in the search path, that's an older version.

    Are you installing the DLL into the same folder as the calling application?