Regsvr32 fails to find the dll in the current folder
Asked Answered
T

4

9

When I use "regsvr32 foo.dll" i get a "The specified module cannot be found" error.

The error is being caused because regsvr32 cannot find the file even though it is the current folder.

I have specified the full path, and it still doen't work. Any ideas????

Trilbie answered 29/7, 2009 at 11:27 Comment(0)
P
13

This can happen if foo.dll has a depenency on bar.dll and it's actually bar.dll that can't be found.

Try using depends.exe from MSVC to check the dependencies of foo.dll and see if any are missing.

Another option is to download and run FileMon. Then run regsvr32 again and see which file/module it fails to find. This should definitely track it down.

Petrochemical answered 29/7, 2009 at 11:42 Comment(0)
L
7

On the 64bit OSes, Dependency Walker has been uninformative for me; and FileMon has been replaced by Process Monitor (see https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to download the utility). Here is how I was able to find the missing references using Process Monitor:

ProcMon Toolbar for the Filter Dialog

Open the Filter Dialog either from the toolbar or the menu.

ProcMon Filter Dialog

Add the Process Name of regsvr32.exe to the filter list and remove any PID filters.

ProcMon Clear Toolbar Button

Clear the list, ...

ProcMon Capture Toolbar Button

... turn on Capturing, if it is not already on.

Run your regsvr32.exe command from a console window. Once complete, you might want to toggle the capture off.

missing reference lines

Look for the missing reference after regsvr32 has loaded your DLL.

Letourneau answered 12/10, 2017 at 17:41 Comment(1)
I ultimately figured it out another way but it looks like this does work. There is a lot of stuff to go through though. But look for Load Image of the dll you are running against. For me this was around 66% of the way down the log when filtered to the one regsvr32 call. You can filter to just Operation is Load Image to maybe find it more easily. (Then highlight it and take off that filter.) Immediately after that is like in your image, a ton of NAME NOT FOUND lines for a particular other .dll file searching for it in various places and not finding it.Shauna
P
0

In my case REGSVR32 claimed "no file found..." when the DLL's (actually legacy VB OCX's) were in SYSTEM32. After moving them to a another directory REGSVR32 succeeded.

Postremogeniture answered 26/7, 2021 at 14:48 Comment(0)
P
0

In some versions of Windows10 the file to be registered by SYSWOW64\REGSVR32 has to reside in SYSWOW64

Postremogeniture answered 10/10, 2021 at 10:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.