Version resource in DLL not visible with right-click(DLL 中的版本资源在右键单击时不可见)
问题描述
我正在尝试做一些在常规 MSVC 中很容易做但在 VC++ Express 中不容易支持的事情.
I'm trying to do something which is very easy to do in the regular MSVC, but not supported easily in VC++ Express.
VC++ Express 中没有资源编辑器.所以我在我的 DLL 项目中添加了一个名为 version.rc 的文件.该文件具有以下内容,由资源编译器编译并添加到最终 DLL 中.可以使用 reshacker 在 DLL 中查看此资源,但在 Windows 资源管理器中右键单击 DLL 时则无法查看.
There is no resource editor in VC++ Express. So I added a file named version.rc into my DLL project. The file has the below content, which is compiled by the resource compiler and added to the final DLL. This resource is viewable in the DLL using reshacker, though not when right-clicking the DLL in Windows Explorer.
我的 RC 文件缺少什么使其在右键单击时出现?
What is missing from my RC file to make it appear when right-clicking?
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "something Application"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "something"
VALUE "LegalCopyright", "Copyright (C) 2008 Somebody"
VALUE "OriginalFilename", "something.exe"
VALUE "ProductName", "something Application"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
推荐答案
正确的解决方案是添加到 .rc 文件的顶部:
The correct solution is to add to the top of your .rc file:
#include <windows.h>
这篇关于DLL 中的版本资源在右键单击时不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:DLL 中的版本资源在右键单击时不可见


基础教程推荐
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 常量变量在标题中不起作用 2021-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 我有静态或动态 boost 库吗? 2021-01-01
- 这个宏可以转换成函数吗? 2022-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 如何通过C程序打开命令提示符Cmd 2022-12-09