无法使用regsvr32注册dll
我的项目生成一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚遇到了同样的问题。
如果您运行的是 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
从命令行运行 regsvr32 时,该 DLL 可能会链接到不在路径中的另一个 DLL。
The DLL might link to another DLL which isn't in the path when running regsvr32 from the command line.
首先,您必须以管理员身份启动
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, theregsvr32.exe
's default working directory isC:\Windows\System32\
.you may get some help for your answers from here, here
我知道为时已晚......但我正在为其他人添加我的解决方案,因为在遵循上述答案后我遇到了同样的错误:
“我刚刚遇到了同样的问题。
如果您运行的是 64 位 Windows 并且您已放置Windows\System32\ 中的 32 位 DLL 会出现此错误,
只需将 DLL 放入 Windows\SysWOW64\ 并从那里注册即可。”
如果您在将 DDL 放置到 SysWOW64 后遇到同样的错误,那么您需要打开 MSMQ 功能。
现在,再次注册相同的 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.
Now, register the same DLL again and this time it will be registered