Function Reference


_WinAPI_DllGetVersion

Retrieves a DLL-specific version information

#include <WinAPIShellEx.au3>
_WinAPI_DllGetVersion ( $sFilePath )

Parameters

$sFilePath The path to the DLL file from which information is retrieved.

Return Value

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_*).
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

Remarks

This function is not an API. It is exported by name from each DLL that implements it.
Currently, most of the Windows Shell and common controls DLLs implement DllGetVersion.
These include, but are not limited to, shell32.dll, comctl32.dll, shdocvw.dll, and shlwapi.dll.

See Also

Search DllGetVersion in MSDN Library.

Example

#include <APIShellExConstants.au3>
#include <WinAPIShellEx.au3>

Local Const $sDll = @SystemDir & '\comctl32.dll'

Local $sText
Local $aData = _WinAPI_DllGetVersion($sDll)
Switch @error
        Case 0
                Switch $aData[3]
                        Case $DLLVER_PLATFORM_WINDOWS
                                $sText = 'Windows 95/98'
                        Case $DLLVER_PLATFORM_NT
                                $sText = 'NT-based'
                        Case Else
                                $sText = 'Unknown platform'
                EndSwitch
                ConsoleWrite($sDll & ' => ' & $aData[0] & '.' & $aData[1] & '.' & $aData[2] & ' (' & $sText & ')' & @CRLF)
        Case 3
                ConsoleWrite('DllGetVersion not implemented in ' & $sDll & '.' & @CRLF)
        Case Else
                ConsoleWrite('Unable to retrieve version information.' & @CRLF)
EndSwitch