右键单击DLL中的版本资源不可见 [英] Version resource in DLL not visible with right-click
问题描述
我没有任何资源编辑器VC ++ Express。所以我在我的DLL项目中添加了一个名为version.rc的文件。该文件具有以下内容,由资源编译器编译并添加到最终的DLL。
我的RC文件丢失了什么,使其在右键单击时显示。 - 点击?
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
BLOCKStringFileInfo
BEGIN
BLOCK040904b0
BEGIN
VALUEFileDescription应用程序
VALUEFileVersion,1,0,0,1
VALUEInternalName,something
VALUELegalCopyright,Copyright b $ b VALUEOriginalFilename,something.exe
VALUEProductName,something Application
VALUEProductVersion,1,0,0,1
END
END
BLOCKVarFileInfo
BEGIN
VALUETranslation,0x409,1200
END
END
解决方案正确的解决方案是添加到.rc文件的顶部:
#include< windows.h>
I'm trying to do something which is very easy to do in the regular MSVC, but not supported easily in VC++ Express.
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.
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
解决方案The correct solution is to add to the top of your .rc file:
#include <windows.h>
这篇关于右键单击DLL中的版本资源不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!