Retrieves a DLL-specific version information.
#Include <WinAPIEx.au3>
_WinAPI_DllGetVersion ( $sPath )
$sPath | The path to the DLL file from which information is retrieved. |
Success | The array containing the following information: |
[0] | The major version. |
[1] | The minor version. |
[2] | The build number. |
[3] | The platform for which the DLL was built ($DLLVER_PLATFORM_*). |
失败: | 返回 0 并设置 @error 标志为非 0 值, @extended 标志可能包含一个系统错误代码. |
在MSDN中搜索
#Include <APIConstants.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global Const $sDll = @SystemDir & '\comctl32.dll'
Global $Data, $Text
$Data = _WinAPI_DllGetVersion($sDll)
Switch @error
Case 0
Switch $Data[3]
Case $DLLVER_PLATFORM_WINDOWS
$Text = 'Windows 95/98'
Case $DLLVER_PLATFORM_NT
$Text = 'NT-based'
Case Else
$Text = 'Unknown platform'
EndSwitch
ConsoleWrite($sDll & ' => ' & $Data[0] & '.' & $Data[1] & '.' & $Data[2] & ' (' & $Text & ')' & @CR)
Case 3
ConsoleWrite('DllGetVersion not implemented in ' & $sDll & '.' & @CR)
Case Else
ConsoleWrite('Unable to retrieve version information.' & @CR)
EndSwitch