您需要创建一个版本资源并将其添加到您的项目中.这可以很容易地从视觉工作室完成.在VS 2008中,右键单击项目的文件夹,选择添加并在“Visual C”下选择“资源文件”(而不是资源模板),在刚刚创建的资源文件中,您将可以添加一个类似于这个:
原文链接:https://www.f2er.com/windows/363694.htmlVS_VERSION_INFO VERSIONINFO FILEVERSION 1,1 PRODUCTVERSION 1,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","XXX Application" VALUE "FileVersion","1,1" VALUE "InternalName","XXX" VALUE "LegalCopyright","Copyright (C) 2010" VALUE "OriginalFilename","XXX.exe" VALUE "ProductName","XXX Application" VALUE "ProductVersion",1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation",0x409,1200 END END
从命令行,您需要使用rc.exe,资源编译器,然后将结果链接到您的DLL.