0

The DLL (my.dll) is loaded by the Windows Time Service. It has an associated log, which is registered with the windows event logging service with wevtutil im mymanfile.man.

I rebuilt the project with VS12 libraries and am now having a problem with my.dll loading. It's not touched at all - no logging occurs, remote debugging doesn't work because it's not being loaded.

I have looked at it with dependency walker and resolved most of the dependency issues, except a bunch of API_MS_WIN_* dependencies, which I think are just noise and not actually root cause.

I need some more help figuring out what can cause a "The specified module could not be found 0x8007007E" error in the system logs. How does Windows determine a DLL is not loadable? What could be missing when I changed from vs10 to vs12 libraries? What's the Windows procedure for loading a DLL for a service (such as w32time)?

  • If it were a process loading the dll [ProcessMonitor](https://technet.microsoft.com/en-gb/sysinternals/bb896645.aspx) is a great tool for debugging runtime DLL load failures. But as its a service I dont think that would work. If you could make a small harness application which tries to load your DLL (and *presumably* fails in a similar fashion) and see if that gets you anywhere. – Mike Vine Feb 13 '15 at 00:00
  • Provide concrete reproduction steps and phrase your question in a manner that'll help someone else some day! Thanks! – Lightness Races in Orbit Feb 13 '15 at 00:12
  • http://stackoverflow.com/q/2066180/560648 – Lightness Races in Orbit Feb 13 '15 at 00:13
  • Enabling loader snaps is the official way to troubleshoot this. But yes, Process Monitor is hard to beat for convenience. – Hans Passant Feb 13 '15 at 00:25
  • @MikeVine I have looked at Process Monitor, but I'm not sure how to use it to debug my dll's run time errors. Is there a guide somewhere you could recommend? Thank you very much. – user3155223 Feb 17 '15 at 20:26

2 Answers2

1

It looks like you may be missing C++ runtime DLLs.

Give this program a try: http://www.dependencywalker.com

Mike Nakis
  • 56,297
  • 11
  • 110
  • 142
0

I found out what the answer to this issue was:

The w32time time service was unable to load the .dll. The reason why is that the load order goes: 1) current working directory 2) system path 3) default system directory.

My problem was the current working directory was NOT the place where the DLL actually was. I needed to add my path to PATH in order for the system to find it.

The solution was simply set PATH = %PATH%/dir_where_dll_lives