5

My project generates a dll and when build in Debug mode the dll gets registered automatically by Visual Studio 2005. But when I try to register the same dll in command prompt using "regsvr32" I'm unable to register. I get the following error,

The module ".." failed to load. Make sure the binary is stored at specified path or debug it to check problems with the binary or dependent .DLL files.

But I have all the dependent dlls in place. What could be the reason for this issue.?

I tried registering and unregistering the dll using the following command,

regsvr32 dll_name.dll

regsvr32 /u dll_name.dll

SyncMaster
  • 9,754
  • 34
  • 94
  • 137

4 Answers4

3

I just had the same issue.

If you're running 64-bit Windows and you've placed the 32-bit DLL in Windows\System32\ then it'll give you this error.

Simply place the DLL into Windows\SysWOW64\ and register it from there.

Here's where I found the fix:

http://csi-windows.com/blog/all/73-windows-64-bit/378-fixing-qregsvr32-the-module-failed-to-load-the-specified-module-could-not-be-foundq

WhatEvil
  • 481
  • 5
  • 18
  • I am getting the same error I have placed the .ocx and .dll file in syswow64 folder and trying to execute this command `c:\windows\syswow64> regsvr32 abc.ocx` but still getting the error any solution – Naveen Kumar Jun 14 '17 at 11:54
0

The DLL might link to another DLL which isn't in the path when running regsvr32 from the command line.

Ori Pessach
  • 6,777
  • 6
  • 36
  • 51
0

I know its too late... but I am adding my solution for others because I faced the same error after following above mentioned answers:

"I just had the same issue.

If you're running 64-bit Windows and you've placed the 32-bit DLL in Windows\System32\ then it'll give you this error.

Simply place the DLL into Windows\SysWOW64\ and register it from there."

If you are facing same error after placing DDL to SysWOW64, then you need to turn on MSMQ feature.

  1. Go to Start
  2. Search "Turn Windows features on or off"
  3. Find "Microsoft Message Queue(MSMQ) Server" and Enable it. enter image description here

Now, register the same DLL again and this time it will be registered

0

First, you have to start the Command as a administrator. Second, you didn't specify your dll file in which directory. If your operating system is 32-bit windows operating system, the regsvr32.exe's default working directory is C:\Windows\System32\.

you may get some help for your answers from here, here

viperchaos
  • 395
  • 1
  • 4
  • 15