Jump to content

_WinAPI_DllGetVersion unexpectedly does not work


Recommended Posts

Despite using the function _WinAPI_Wow64EnableWow64FsRedirection(False) and having the appropriate DLL, the function _WinAPI_DllGetVersion in the following code always gives me @error = 1.

#include <WinAPIFiles.au3>
#include <WinAPIShellEx.au3>

Main()

Func Main()
    Local $sDllPath = @WindowsDir & "\System32\QMgr.dll"
    Local $aDllVersion = 0

    _WinAPI_Wow64EnableWow64FsRedirection(False)
    If FileExists($sDllPath) Then
        $aDllVersion = _WinAPI_DllGetVersion($sDllPath)
        If @error Then
            ConsoleWrite("@error = " & @error & @CRLF)
        Else
            ConsoleWrite($aDllVersion[0] & "." & $aDllVersion[1] & "." & $aDllVersion[2] & @CRLF)
        EndIf
    EndIf
EndFunc

I don't understand what is the cause of the error and I hope someone can give me the crucial hint.

Link to comment
Share on other sites

As it says in help file :

Quote

This function is not an API. It is exported by name from each DLL that implements it.

If the dll does not implement the 'DllGetVersion' function in its own DLL,  you cannot use  _WinAPI_DllGetVersion.

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...