VERSIONINFO Resource
转自(http://www.xuebuyuan.com/1202062.html)
VERSIONINFO Resource
Defines a version-information resource. The resource contains such information about the file as its version number, its intended operating system, and its original filename. The resource is intended to be used with theVersion Information functions.
There are two ways to format a VERSIONINFO statement:
versionID VERSIONINFO fixed-info { block-statement . . . }
- or -
versionID VERSIONINFO
fixed-info
BEGIN
block-statement
. . .
END
Parameters
- versionID
-
Version-information resource identifier. This value must be 1.
- fixed-info
-
Version information, such as the file version and the intended operating system. This parameter consists of the following statements.
Statement Description FILEVERSIONversion Binary version number for the file. The version consists of two
32-bit integers, defined by four 16-bit integers. For example, "FILEVERSION
3,10,0,61" is translated into two doublewords: 0x0003000a and 0x0000003d, in
that order. Therefore, if version is defined by the
DWORD values dw1 and dw2, they need to appear
in the FILEVERSION statement as follows:HIWORD(dw1)
,LOWORD(dw1)
,HIWORD(dw2)
,LOWORD(dw2)
.PRODUCTVERSIONversion Binary version number for the product with which the file is distributed.
The version parameter is two 32-bit integers, defined by four 16-bit
integers. For more information about version, see the
FILEVERSION description.FILEFLAGSMASKfileflagsmask Bits in the FILEFLAGS statement are valid. If a bit is set,
the corresponding bit in FILEFLAGS is valid.FILEFLAGS fileflags Attributes of the file. The fileflags parameter must be the
combination of all the file flags that are valid at compile time. For 16-bit
Windows, this value is 0x3f.FILEOS fileos Operating system for which this file was designed. The fileos
parameter can be one of the operating system values given in the Remarks
section.FILETYPE filetype General type of file. The filetype parameter can be one of the file
type values listed in the Remarks section.FILESUBTYPEsubtype Function of the file. The subtype parameter is zero unless the
filetype parameter in the FILETYPE statement is
VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file subtype values, see the
Remarks section. - block-statement
-
Specifies one or more version-information blocks. A block can contain string information or variable information. For more information, see StringFileInfo Block or VarFileInfo Block.
Remarks
To use the constants specified with the VERSIONINFO statement, you must include the Winver.h or Windows.h header file in the resource-definition file.
The following list describes the parameters used in the
VERSIONINFO statement:
- fileflags
-
A combination of the following values.
Value Description VS_FF_DEBUG File contains debugging information or is compiled with debugging features
enabled.VS_FF_PATCHED File has been modified and is not identical to the original shipping file of
the same version number.VS_FF_PRERELEASE File is a development version, not a commercially released
product.VS_FF_PRIVATEBUILD File was not built using standard release procedures. If this value is
given, the StringFileInfo block must
contain a PrivateBuild string.VS_FF_SPECIALBUILD File was built by the original company using standard release procedures but
is a variation of the standard file of the same version number. If this value is
given, the StringFileInfo block block
must contain a SpecialBuild string.VS_FFI_FILEFLAGSMASK A combination of all the preceding values. - fileos
-
One of the following values.
Value Description VOS_UNKNOWN The operating system for which the file was designed is unknown. VOS_DOS File was designed for MS-DOS. VOS_NT File was designed for 32-bit Windows. VOS__WINDOWS16 File was designed for 16-bit Windows. VOS__WINDOWS32 File was designed for 32-bit Windows. VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with MS-DOS. VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with MS-DOS. VOS_NT_WINDOWS32 File was designed for 32-bit Windows. The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved.
- filetype
-
One of the following values.
Value Description VFT_UNKNOWN File type is unknown. VFT_APP File contains an application. VFT_DLL File contains a dynamic-link library (DLL). VFT_DRV File contains a device driver. If filetype is VFT_DRV,
subtype contains a more specific description of the driver.VFT_FONT File contains a font. If filetype is VFT_FONT, subtype
contains a more specific description of the font.VFT_VXD File contains a virtual device. VFT_STATIC_LIB File contains a static-link library. All other values are reserved for use by Microsoft.
- subtype
-
Additional information about the file type.
If filetype specifies VFT_DRV, this parameter can be one of the
following values.Value Description VFT2_UNKNOWN Driver type is unknown. VFT2_DRV_COMM File contains a communications driver. VFT2_DRV_PRINTER File contains a printer driver. VFT2_DRV_KEYBOARD File contains a keyboard driver. VFT2_DRV_LANGUAGE File contains a language driver. VFT2_DRV_DISPLAY File contains a display driver. VFT2_DRV_MOUSE File contains a mouse driver. VFT2_DRV_NETWORK File contains a network driver. VFT2_DRV_SYSTEM File contains a system driver. VFT2_DRV_INSTALLABLE File contains an installable driver. VFT2_DRV_SOUND File contains a sound driver. VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver. If filetype specifies VFT_FONT, this parameter can be one of the
following values.Value Description VFT2_UNKNOWN Font type is unknown. VFT2_FONT_RASTER File contains a raster font. VFT2_FONT_VECTOR File contains a vector font. VFT2_FONT_TRUETYPE File contains a TrueType font. If filetype specifies VFT_VXD, this parameter must be the
virtual-device identifier included in the virtual-device control block.All subtype values not listed here are reserved for use by
Microsoft. - langID
-
One of the following language codes.
Code Language Code Language 0x0401 Arabic 0x0415 Polish 0x0402 Bulgarian 0x0416 Portuguese (Brazil) 0x0403 Catalan 0x0417 Rhaeto-Romanic 0x0404 Traditional Chinese 0x0418 Romanian 0x0405 Czech 0x0419 Russian 0x0406 Danish 0x041A Croato-Serbian (Latin) 0x0407 German 0x041B Slovak 0x0408 Greek 0x041C Albanian 0x0409 U.S. English 0x041D Swedish 0x040A Castilian Spanish 0x041E Thai 0x040B Finnish 0x041F Turkish 0x040C French 0x0420 Urdu 0x040D Hebrew 0x0421 Bahasa 0x040E Hungarian 0x0804 Simplified Chinese 0x040F Icelandic 0x0807 Swiss German 0x0410 Italian 0x0809 U.K. English 0x0411 Japanese 0x080A Spanish (Mexico) 0x0412 Korean 0x080C Belgian French 0x0413 Dutch 0x0C0C Canadian French 0x0414 Norwegian – Bokmal 0x100C Swiss French 0x0810 Swiss Italian 0x0816 Portuguese (Portugal) 0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic) 0x0814 Norwegian – Nynorsk - charsetID
-
One of the following character-set identifiers.
Decimal Hexadecimal Character Set 0 0000 7-bit ASCII 932 03A4 Japan (Shift – JIS X-0208) 949 03B5 Korea (Shift – KSC 5601) 950 03B6 Taiwan (Big5) 1200 04B0 Unicode 1250 04E2 Latin-2 (Eastern European) 1251 04E3 Cyrillic 1252 04E4 Multilingual 1253 04E5 Greek 1254 04E6 Turkish 1255 04E7 Hebrew 1256 04E8 Arabic - string-name
-
One of the following predefined names.
Name Description Comments Additional information that should be displayed for diagnostic
purposes.CompanyName Company that produced the file—for example, "Microsoft Corporation" or
"Standard Microsystems Corporation, Inc." This string is required.FileDescription File description to be presented to users. This string may be displayed in a
list box when the user is choosing files to install—for example, "Keyboard
Driver for AT-Style Keyboards". This string is required.FileVersion Version number of the file—for example, "3.10" or "5.00.RC2". This string is
required.InternalName Internal name of the file, if one exists—for example, a module name if the
file is a dynamic-link library. If the file has no internal name, this string
should be the original filename, without extension. This string is
required.LegalCopyright Copyright notices that apply to the file. This should include the full text
of all notices, legal symbols, copyright dates, and so on. This string is
optional.LegalTrademarks Trademarks and registered trademarks that apply to the file. This should
include the full text of all notices, legal symbols, trademark numbers, and so
on. This string is optional.OriginalFilename Original name of the file, not including a path. This information enables an
application to determine whether a file has been renamed by a user. The format
of the name depends on the file system for which the file was created. This
string is required.PrivateBuild Information about a private version of the file—for example, "Built by
TESTER1 on /TESTBED". This string should be present only if VS_FF_PRIVATEBUILD
is specified in the fileflags parameter of the root block.ProductName Name of the product with which the file is distributed. This string is
required.ProductVersion Version of the product with which the file is distributed—for example,
"3.10" or "5.00.RC2". This string is required.SpecialBuild Text that indicates how this version of the file differs from the standard
version—for example, "Private build for TESTER1 solving mouse problems on M250
and M250E computers". This string should be present only if VS_FF_SPECIALBUILD
is specified in the fileflags parameter of the root
block.
Certain attributes are also supported for backward compatibility. For more information, see Common Resource Attributes.
Examples
The following example defines a VERSIONINFO resource:
#define VER_FILEVERSION 3,10,349,0
#define VER_FILEVERSION_STR "3.10.349.0/0" #define VER_PRODUCTVERSION 3,10,0,0
#define VER_PRODUCTVERSION_STR "3.10/0" #ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", VER_COMPANYNAME_STR
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR
VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END BLOCK "VarFileInfo"
BEGIN
/* The following line should only be modified for localized versions. */
/* It consists of any number of WORD,WORD pairs, with each pair */
/* describing a language,codepage combination supported by the file. */
/* */
/* For example, a file might have values "0x409,1252" indicating that it */
/* supports English language (0x409) in the Windows ANSI codepage (1252). */ VALUE "Translation", 0x409, 1252 END
END
VERSIONINFO Resource的更多相关文章
- Qt之添加Windows资源文件(.rc文件)
简述 在Windows下使用Qt时,通常会用到Windows的资源文件 - 为exe设置信息,其中包括:文件说明.产品名称.产品版本.版权等信息... 由于是Windows平台相关的东西,Qt助手中对 ...
- Qt之Windows资源文件(.rc文件)
简述 在Windows下使用Qt时,通常会用到Windows的资源文件 - 为exe设置信息,其中包括:文件说明.产品名称.产品版本.版权等信息... 由于是Windows平台相关的东西,Qt助手中对 ...
- Spring resource bundle多语言,单引号format异常
Spring resource bundle多语言,单引号format异常 前言 十一假期被通知出现大bug,然后发现是多语言翻译问题.法语中有很多单引号,单引号在format的时候出现无法匹配问题. ...
- Spring5:@Autowired注解、@Resource注解和@Service注解
什么是注解 传统的Spring做法是使用.xml文件来对bean进行注入或者是配置aop.事物,这么做有两个缺点: 1.如果所有的内容都配置在.xml文件中,那么.xml文件将会十分庞大:如果按需求分 ...
- 【初探Spring】------Spring IOC(三):初始化过程---Resource定位
我们知道Spring的IoC起到了一个容器的作用,其中装得都是各种各样的Bean.同时在我们刚刚开始学习Spring的时候都是通过xml文件来定义Bean,Spring会某种方式加载这些xml文件,然 ...
- 2000条你应知的WPF小姿势 基础篇<34-39 Unhandled Exceptions和Resource>
在正文开始之前需要介绍一个人:Sean Sexton. 来自明尼苏达双城的软件工程师.最为出色的是他维护了两个博客:2,000Things You Should Know About C# 和 2,0 ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- AngularJS Resource:与 RESTful API 交互
REST(表征性状态传输,Representational State Transfer)是Roy Fielding博士在2000年他的博士论文中提出来的一种软件架构风格.RESTful风格的设计不仅 ...
- 运行nltk示例 Resource u'tokenizers punkt english.pickle' not found解决
nltk安装完毕后,编写如下示例程序并运行,报Resource u'tokenizers/punkt/english.pickle' not found错误 import nltk sentence ...
随机推荐
- SQL Server批量数据导出导入BCP&Bulk使用
数据导出导入,首先考虑使用什么技术实现导出与导入利用BCP结合Bulk技术实现数据的导出与导入 1.bcp数据导出(这里是命令行方式),导出的数据需是格式化的,有两种方式可选 a.对传输的数据格式要求 ...
- MySQL和MSSQL差异(增量)备份的原理
MySQL和MSSQL差异(增量)备份的原理 对于真正的增量备份来说,只需要记录当前每页最后的检查点的LSN,如果大于之前全备时的LSN,则备份该页面,否则不用备份 这大大加快了备份速度和恢复时间,同 ...
- controller中两个方法之间共享一个变量LinkedHashMap
1:引用传递,创建一个变量,给两个线程都传递进去. 2:静态修饰 static 通过该修饰符说明,该变量只有一份, 所有线程共用一份. 例如下面的htmlidMap通过static变量修饰, up ...
- 朴素贝叶斯算法原理及Spark MLlib实例(Scala/Java/Python)
朴素贝叶斯 算法介绍: 朴素贝叶斯法是基于贝叶斯定理与特征条件独立假设的分类方法. 朴素贝叶斯的思想基础是这样的:对于给出的待分类项,求解在此项出现的条件下各个类别出现的概率,在没有其它可用信息下,我 ...
- C语言头文件#include<stdlib.h>的作用
stdlib 头文件即standard library标准库头文件 stdlib 头文件里包含了C.C++语言的最常用的系统函数 该文件包含了的C语言标准库函数的定义 stdlib.h里面定义了五 ...
- cocos代码研究(19)Widget子类ImageView学习笔记
理论基础 显示图片的小控件,继承自 Widget . 代码实践 static ImageView * create()创建一个空的ImageView static ImageView * create ...
- 如何使用代码备份SQL Server数据库
1.添加引用 using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Common; 2. Bac ...
- Ubuntu 添加用户到 sudoer
一.概述 新建用户后,我们可能需要该用户能够使用一些越权的东西.sudo命令能够暂时提升该用户的权限到root,但是前提是要求该用户存在与 sudoer list 中. sudoers 存储在 /et ...
- python面向对象编程基础
演示了 Python 类与对象的编程基础, 包括属性.方法.继承.组合.动态创建类. python 版本: 2.7.5 class SimpleClass(object): ''' a simple ...
- nats
NATS is a family of open source products that are tightly integrated but can be deployed independent ...