Jump to content
Sign in to follow this  
sanhen

DllGetVersion problem

Recommended Posts

trancexx

Hello everyone, why it returns 0

$str = DllStructCreate("int;int;int;int;int")
DllCall("Shlwapi.dll","long","DllGetVersion","ptr",DllStructGetPtr($str))
MsgBox(64,"Ver",DllStructGetData($str,1))
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


♡♡♡

.

eMyvnE

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.