visual-studio - regsvr32 中的 undocumented/c 选项有什么作用

标签 visual-studio dll regsvr32

我正在将带有 COM 组件的 native C++ DLL 从 Visual Studio 6.0 更新到 Visual Studio 2019。原始项目有一个生成后事件来注册 DLL

regsvr32 /s /c my.dll

查看 regsvr32 的帮助屏幕,未列出/c 选项,在线搜索甚至 Microsoft 在线文档都没有在 regsvr32 的/c 选项上找到任何内容。我意识到使用 VS2019 我可以在 Linker Properties 下选择 register output 选项,但我想知道原始项目中/c 选项的原因是什么。

regsvr32 help screen

选项/c 似乎是有效的,因为使用它不会生成错误消息,而使用其他无效选项会生成错误消息。上面的帮助屏幕是用

生成的
regsvr32 /z my.dll

最佳答案

在 Windows 2000 之前,regsvr32/c 用于将其输出发送到控制台(而 VC++ 6 可以追溯到 1998 年,当时 NT 3.x/4.0 仍然存在并且运行良好)。

enter image description here

JSI Tip 6434 中也提到了这一点这更正了 Q288373 中的“to the computer”拼写错误。

In Windows NT 4.0 and other previous operating systems, you could use the /C switch with Regsvr32.exe to send output to the console, which allowed you to script the process and test for the result. This functionality is no longer included in Windows NT 5.0 and higher.

关于visual-studio - regsvr32 中的 undocumented/c 选项有什么作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63694049/

相关文章:

java - Android隐藏类的实现?

asp-classic - 使用regsvr32注销COM dll

visual-studio - Azure 门户缺少 Web 应用程序

visual-studio - Visual Studio - 是否有重复的最后一个命令命令或快捷方式?

.net - Visual Studio 2008 在我的所有断点处都没有停止,当我跳过语句时,通常是 “runs away”,为什么?

c++ - 如何防止宏重新定义

c# - 结构 - System.Runtime.Interoptservice C++ 与 C#

c++ - WinAPI:钩子(Hook)函数中的非dll数据

wix - 安装文件会自动注册吗?

windows - regsvr32 在当前文件夹中找不到dll