dll - AutoIt (AutoItX) on C# Windows 7 App System.DllNotFoundException -


i have c# application uses autoitx automation. application works fine in windows 8.1 x64 environment compiled microsoft visual studio 2013 release 3.

i pushed copy of app code bitbucket repository , cloned computer running windows 7 x64. autoitx version 3.14.2 installed , 32bit calls selected. application compiled using visual studio 2013 release 4.

the app compiled fine, first use of autoit functions resulted in error:

an unhandled exception of type 'system.dllnotfoundexception' occurred in autoitx3.assembly.dll 

i tried following steps. app tested after each of these steps

  1. attempted register .dll manually using regsrv32

    regsrv32 "c:\program files (x86)\autoit3\autoitx\autoitx3.dll"

  2. uninstalled visualstudio 2013 r4 , attempted reinstall visualstudio 2013 r3 {the installation of r3 failed because required internet explorer version 10 , version 11 has been installed on computer} r4 reinstalled

  3. uninstalled autoit , reinstalled selecting 64 bit library preference. compiled app x64 platform option

  4. uninstalled autoit , reinstalled using 32 bit library preference compiled app x86 platform option

  5. manually copied autoitx3.dll c:\windows\system32 directory

  6. manually copied autoitx3_x64.dll c:\windows\syswow64 directory. compiled app x64 platform

  7. wiped computer clean , reinstalled windows 7, autoit (32 bit preference), visual studio 2013 r4

  8. installed autoit v14

  9. installed beta version of autoit v15

  10. performed windows update - 213 updates (!) installed

  11. installed internet explorer v11

  12. performed windows update - 4 updates installed

  13. installed autoit version 3.10.2 worked on windows 8 system

i appreciate suggestions on try next. i'm missing basic, can't find solution

  1. manually copied autoitx3.dll c:\windows\system32 directory

  2. manually copied autoitx3_x64.dll c:\windows\syswow64 directory. compiled app x64 platform

that's thing did wrong, reversed copies. there no other dlls missing, autoitx3.dll , autoitx3_x64.dll files have no other dependencies not available on windows machine. operating system dlls, they've been around forever. can see dumpbin.exe /imports.

and exception message comes out of .net, caused [dllimport] attribute. can see content of autoitx3.assembly.dll decompiler ilspy or reflector. there little it, 2 dlls ever used. autoitx3.dll 32-bit code , autoit_x64.dll 64-bit code.

fairly tragic btw, otherwise side-effect of ab/using operating system directories non-operating system dlls. real way make sense of why backwards know history of windows.

back in days of windows when still 16-bit operating system (versions 1 through 3.11), c:\windows\system home directory operating system executables. starting nt 3.11 , windows 95, first 32-bit versions, directory renamed c:\windows\system32. when 64-bit version became available, microsoft not rename c:\windows\system64 anymore. many programs hard-coded name of directory in source code. breaking programs have been idea, not strategy customers move next version.

the 64-bit version has emulator can run 32-bit programs, called wow64. "windows on 64-bit windows". c:\windows\syswow64 directory therefore home directory of 32-bit executables.

exactly backwards names suggest. reverse copies , runtime error disappear.


generic advice applies:

  • the official way loader tell missing dlls enable loader snaps. reliable way, albeit bit clumsy.
  • dependency walker has not been maintained long time , produces far many false warnings. has problem .net programs this, cannot see dependency on autoitx3.dll. should still out of when use profile mode.
  • process monitor best tool troubleshoot missing dlls. you'll see program searching missing dll, can tell name , directories looks in trace. start near bottom working backwards avoid drowning in data. should note been unreliable lately on machine use since ~win81, trace missing stuff know should have been there. ymmv.

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -