windows - 如何调试regsvr32编译后DLL注册异常?

标签 windows com dll registration

我正在使用 Visual Studio 2008(在 Windows 2003 Server/32 位上)编译一个库,在生成 DLL 后,“自定义构建步骤”->“常规”执行命令行:

regsvr32 /s /c "($TargetPath)"

产生异常:

An unhandled win32 exception occurred in regsvr32.exe [212].

这会引发一个调试 session ,其中显示的信息非常少。

在 cmd 窗口中从命令行运行 regsvr32 会引发异常(尽管末尾的数字不同)。

感谢任何指点!

最佳答案

在调试器中运行 dll,将 regsvr32 设置为调试目标。

您需要在 DllRegisterServer 函数中放置一个断点。

关于windows - 如何调试regsvr32编译后DLL注册异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/802238/

相关文章:

windows - 如何在出现第一个错误时停止 PowerShell 脚本?

c++ - 在 Windows 环境中从 C 或 C++ 访问 COM 接口(interface)

c# - 了解 IlMerge - 如何打包一个可执行文件及其所有相关的 dll

python - 导入错误: DLL load failed: %1 is not a valid Win32 application for _imaging module

delphi - 如何将 (Delphi) OLE 服务器与第二个客户端重用?

windows - 使 qt 分布整洁。删除部分dll?

css - Windows 上的 CSS 更少

windows - 亚马逊 AWS - Windows 实例设置

具有枚举值的 C# Propertygrid 组合框(Win Forms)

c# - 通过 COM 到 VB6 实现具有事件的 c# 接口(interface)