Jump to content
Sign in to follow this  
Chocolade

error: Unable to load DLL 'AutoItX3_x64.dll

Recommended Posts

Chocolade

I'm using csharp with the autoitx3.

I added to my project referenced the autoit dll's. Everything was working find until I got exception say:

"Unable to load DLL 'AutoItX3_x64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

And I downloaded and installed the autoit and added the dll files referenced them to my project also the file name:

AutoitX3_x64.dll but for some reason I don't see this dll file in the project tried to add it as reference few times and in the References I see only two files of Autoit: AutoItX3.Assembly.dll and Interop.AutoItX3Lib.dll but for some reason it's not adding the AutoitX3_x64.dll as reference.

 

How should I add then the AutoitX3_x64.dll to my project ? I keep getting the exception message that it's missing.

 

Share this post


Link to post
Share on other sites
Chocolade

Found the problem. I needed to change my project Platform target from Any CPU to x86 now it's working.

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  

  • Similar Content

    • vati1011
      By vati1011
      Hey, guys.
      Currently, I'm using Opencv UDF and i'm  encountering issues with DLLOPEN(). it is failing and returning -1
      But, I cannot figure out why it is failing.
      I need help from people.
      I'm running windows 10 32bit.
      This's my code.
      #RequireAdmin $fileopen = DllOpen("opencv_core2413.dll") MsgBox(0,"Result",$fileopen) Example.au3opencv_core2413.dll
    • xiantez
      By xiantez
      This script used to work on an older version of AutoIT. Currently I am running AutoIT v3.3.14.5 and it's failing.
      Func PublicIP() ;Post public facing IP address Local $url = 'https://www.google.com/search?client=opera&q=what+is+my+ip&sourceid=opera&ie=UTF-8&oe=UTF-8' Local $getIPaddress = BinaryToString(InetRead($url)) Local $sStart = 'clamp:2">' Local $sEnd = '</div>' Local $ipaddress = _StringBetween($getIPaddress, $sStart, $sEnd For $i In $ipaddress MsgBox(0, 'External IP', "Your public IP address is " & $i) Next EndFunc ;==>PublicIP The console output shows:
      "C:\Users\user\Documents\AutoIT\Scripts\WSI Tools.au3" (197) : ==> Variable must be of type "Object".: For $i In $ipaddress For $i In $ipaddress^ ERROR ->14:12:16 AutoIt3.exe ended.rc:1 +>14:12:16 AutoIt3Wrapper Finished. >Exit code: 1 Time: 9.811
    • Xandy
      By Xandy
      I'm listing the error message strings, and roughly matching the error code
      Is this how to do error reporting?  Is there a more simple way I don't know about?
      I realise I might not need to trap @error inside $error.  I like it this way b/c I have no fear of overwriting @error now; I don't even use it.
      Func Send_Connect($address, $port)     $socket = TCPConnect($address, $port)     $error = @error     If $error <> 0 Then         Local $aError[4] = ["-2 not connected.", _                             "1 IPAddr is incorrect.", _                             "2 port is incorrect."]         $aError[3] = "10060 Connection timed out."         If $error < 0 Then $error = 0         If $error > 2 Then $error = 3         MsgBox(0, "TCP Connect Error", $aError[$error], 0)         $socket = 0     EndIf     Return $socket EndFunc
    • Spartan117
      By Spartan117
      Hi everyone,
      I am wondering if is there any autoit function that make the program ignore errors and move on and resume correct lines?
      Thank you
    • IgImAx
      By IgImAx
      Hi
       
      UPDATED Notes: ===============================================================================
      UPDATED: My main and second questions answered. Here the answers:
      To add/access WinMenuSelectItem you need to [Thanks to Fernando_Marinho]: Add AutoItX.Dotnet in Manage NuGet Packages Right Click in your Project -> Add -> Reference... -> COM ( Type Libraries )than, check the option AutoItX3 1.0 Type Library  using AutoItX3Lib; AutoItX3 au3 = new AutoItX3(); au3.WinMenuSelectItem("", ...) My full source code in C# exists in 11 posts in below. How to access those overloaded methods in AutoitX3 that are not accessible via above method!? Or how to fix AutoitX3 DLL Registration need in target computers without Autoit pre-installed on them!? Please check my post at 14 posts below!
      =============================================================================== Original Post:
       
       
      I was writing a small app in Autoit to close µTorrent app. It was working. Then I try to import AutoItX into C#, but unfortunately this method
      WinMenuSelectItem Couldn't find by IntelliSense and If I typed completely it still give me this message:
      Please check the image. I Google it and I found this QA at stackoverflow: Autoit error within C# application I saw they use this line:
      au = new AutoItX3Lib.AutoItX3Class(); I figure it how to add 'AutoItX3Lib' to project (by adding 'AutoItX3.dll' to reference) but again! When I use this line:
      var au = new AutoItX3Class(); I got this error message: Interop type 'AutoItX3Class' cannot be embedded. Use the applicable interface instead.
      My system info:
      Visual Studio 2017 Enterprise - v15.5.4
      X64 Windows 10 Enterprise 1607
      Thanks in advanced
      IgImAx

×