1

I have an application which relies on several libraries built by other people in my organization, one of which has stopped working. I get this error in the command-line:

Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'XXX.dll' could not be loaded.

I opened up Dependency Walker to try and track down the source of the problem, although I should say that I am brand-new to Dependency Walker and I don't really know what I'm doing. Here's what I see in the log window:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.

Which seems straightforward, except:

  • Due to my unfamiliarity with DW, I can't seem to find what module this error is actually referring to
  • The same DLL that ships with old version of the application, which still works, shows the same thing in Dependency Walker

The only difference I can find between the old and new DLL is that KERNEL32.DLL shows up as red in the newer one, and the function K32EnumProcessModules appears as red (not exported). This same function does not appear at all (green or otherwise) for the old DLL.

To summarize so far: one DLL works and the other doesn't; both show up as 'bad' in Dependency Walker, but in only one does the function K32EnumProcessModules appear as no good. I do not know if this function is what is causing the "unresolved import" error and would like to find out.

The only change in the application I have made that I think could've caused this is upgrading the runtime from .NET 2.5 to .NET 4. This upgrade was made for reasons unrelated to this DLL, and should not affect it: the DLL does not make any calls to .NET components higher than 2.5, and other people in my organization using the same library have reported that it works fine with .NET 4.

I realize I'm providing sparse information, mostly because I'm not sure what information will help troubleshoot this problem. Please let me know if there are tests you'd like me to perform to find out more.

sloverlord
  • 11
  • 2

1 Answers1

0

Probably releated to this https://blogs.msdn.microsoft.com/vcblog/2009/08/27/windows-sdk-v7-0v7-0a-incompatibility-workaround/ Defining PSAPI_VERSION=1 might help.