DonChunior Posted January 5, 2021 Posted January 5, 2021 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.
Nine Posted January 5, 2021 Posted January 5, 2021 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. DonChunior 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
DonChunior Posted January 5, 2021 Author Posted January 5, 2021 Thanks for the quick solution! I had not quite understood the remark in the help, but now everything is clear to me.
Nine Posted January 5, 2021 Posted January 5, 2021 You may use FileGetVersion instead ? DonChunior 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
DonChunior Posted January 6, 2021 Author Posted January 6, 2021 Exactly, the two functions FileGetVersion and StringSplit will also lead me to my goal.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now