无法使用regsvr32注册dll

发布于 2024-10-08 11:14:19 字数 382 浏览 0 评论 0原文

我的项目生成一个 dll,当在调试模式下构建时,Visual Studio 2005 自动注册该 dll。但是当我尝试使用“regsvr32”在命令提示符中注册相同的 dll 时,我无法注册。我收到以下错误,

模块“..” 加载失败。确保二进制文件 保存在指定路径或者debug 它检查二进制文件的问题 或依赖的.DLL 文件。

但我已经准备好了所有依赖的 dll。这个问题的原因可能是什么?

我尝试使用以下命令注册和取消注册 dll,

regsvr32 dll_name.dll

regsvr32 /u dll_name.dll

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

情归归情 2024-10-15 11:14:19

我刚刚遇到了同样的问题。

如果您运行的是 64 位 Windows,并且已将 32 位 DLL 放置在 Windows\System32\ 中,则会出现此错误。

只需将 DLL 放入 Windows\SysWOW64\ 并从那里注册即可。

这是我找到修复程序的地方:

http://csi-windows.com/blog/all/73-windows-64-bit/378-fixing-qregsvr32-the-无法找到模块加载指定模块失败q

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

血之狂魔 2024-10-15 11:14:19

从命令行运行 regsvr32 时,该 DLL 可能会链接到不在路径中的另一个 DLL。

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

反差帅 2024-10-15 11:14:19

首先,您必须以管理员身份启动Command
其次,您没有指定 dll 文件位于哪个目录中。如果您的操作系统是 32 位 Windows 操作系统,则 regsvr32.exe 的默认工作目录为 C:\Windows\System32\

您可能会从 此处这里

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

生生漫 2024-10-15 11:14:19

我知道为时已晚......但我正在为其他人添加我的解决方案,因为在遵循上述答案后我遇到了同样的错误:

“我刚刚遇到了同样的问题。

如果您运行的是 64 位 Windows 并且您已放置Windows\System32\ 中的 32 位 DLL 会出现此错误,

只需将 DLL 放入 Windows\SysWOW64\ 并从那里注册即可。”

如果您在将 DDL 放置到 SysWOW64 后遇到同样的错误,那么您需要打开 MSMQ 功能。

  1. 转到开始
  2. 搜索“打开或关闭 Windows 功能
  3. ”,找到“Microsoft Message Queue(MSMQ) Server”并启用它。
    输入图片description here

现在,再次注册相同的 DLL,这次将被注册

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文