Retrieves the text information from the version-information resource of the specified binary module.
#Include <WinAPIEx.au3>
_WinAPI_VerQueryValueEx ( $hModule [, $sValues [, $iLanguage]] )
$hModule | The handle to a module to retrieve information. Also, this parameter can specify the name of the module to load, it must be a full or relative path. If this parameter is 0 or an empty string, that is equivalent to passing in a handle to the module used to create the current process. |
$sValues | [可选参数] The string containing the field names for which you want to get values. The names must be separated by a "|". For example, "name1|name2|...|namei". If some fields do not exist, the corresponding array elements is an empty string. If this parameter is not specified (empty string), uses the reserved names (12) in the following sequence. "Comments" "CompanyName" "FileDescription" "FileVersion' "InternalName" "LegalCopyright" "LegalTrademarks" "OriginalFilename" "ProductName" "ProductVersion" "PrivateBuild" "SpecialBuild" |
$iLanguage | [可选参数] The language identifier of the version-information resource of interest. To retrieve information for user default language set this parameter to $LOCALE_USER_DEFAULT. To retrieve information for all languages that are located in the resource set this parameter to (-1). |
Success | The 2D array of the string values that specified by $sValues parameter for each language. The zeroth |
array element [0][0] contains the number of languages of the resource. The array dimension (i) equal | |
to the number specified parameters + 1. The zeroth array element [n][0] contains the language | |
identifier (ID). | |
[0][0] - Number of languages (n) | |
[0][i] - Unused | |
[n][0] - ID | |
[n][i] - Value | |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
#Include <APIConstants.au3>
#Include <Array.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Data = _WinAPI_VerQueryValueEx(@ScriptDir & '\Extras\Resources.dll', 'FileDescription|FileVersion|OriginalFilename', -1)
If IsArray($Data) Then
For $i = 1 To $Data[0][0]
$Data[$i][0] = _WinAPI_GetLocaleInfo($Data[$i][0], $LOCALE_SLANGUAGE)
Next
EndIf
_ArrayDisplay($Data, '_WinAPI_VerQueryValueEx')