Jump to content

DllGetVersion problem


sanhen
 Share

Recommended Posts

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...