Sign in to follow this  
Followers 0

DllGetVersion problem

3 posts in this topic

Hello everyone, why it returns 0

$str = DllStructCreate("int;int;int;int;int")
If you want to fill DLLVERSIONINFO then this:

$t_DllVersionInfo = DllStructCreate("dword Size;" & _
        "dword MajorVersion;" & _
        "dword MinorVersion;" & _
        "dword BuildNumber;" & _
        "dword PlatformID")

DllStructSetData($t_DllVersionInfo, "Size", DllStructGetSize($t_DllVersionInfo))

$a_Call = DllCall("Shlwapi.dll", "int", "DllGetVersion", "ptr", DllStructGetPtr($t_DllVersionInfo))

ConsoleWrite("MajorVersion: " & DllStructGetData($t_DllVersionInfo, "MajorVersion") & @CRLF)
ConsoleWrite("MinorVersion: " & DllStructGetData($t_DllVersionInfo, "MinorVersion") & @CRLF)
ConsoleWrite("BuildNumber: " & DllStructGetData($t_DllVersionInfo, "BuildNumber") & @CRLF)
ConsoleWrite("PlatformID: " & DllStructGetData($t_DllVersionInfo, "PlatformID") & @CRLF)

For DLLVERSIONINFO2 you need to expand $t_DllVersionInfo by dword and four ushorts.

And check for errors of course




Share this post

Link to post
Share on other sites


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0