dstrong Posted January 11, 2022 Posted January 11, 2022 I have been using AutoIt V3.3.14.5 calling a C# custom DLL to find the control names on WPF forms in a Windows 10 app that was targeted to .net 4.7.2. This has worked flawlessly for many years. We just rebuilt our Windows 10 app with Visual Studio 2019 and .net 4.8. The attached sample code now errors out (80040154) with the ObjCreate call. I have tried the .net 4.8 patch, signing the DLL, AutoIt V3.3.14.5 beta version and many other things without success. When I uninstall .net 4.8 (KB448129) and reinstall .net 4.7.2 everything works again. This is on Windows 10 Build 1607. The Windows 10 app also has WinForms and they work with both .net versions. It is only the WPF forms and .net 4.8 that don't work. Are there any other things I can try?SimpleWPF.au3
Earthshine Posted January 12, 2022 Posted January 12, 2022 Rebuild the DLL and target to 4.8 My resources are limited. You must ask the right questions
Earthshine Posted January 12, 2022 Posted January 12, 2022 Also you don’t even need it you can use UIAutomation My resources are limited. You must ask the right questions
dstrong Posted January 12, 2022 Author Posted January 12, 2022 Thank you Earthshine, I rebuilt the DLL targeted to 4.8 but have the same results. I will investigate using UIAutomation.
Earthshine Posted January 12, 2022 Posted January 12, 2022 did anything else change in your application? did you add more stuff to it? Anyway, use this stuff Using UI Automation Code in AutoIt - AutoIt Example Scripts - AutoIt Forums (autoitscript.com) My resources are limited. You must ask the right questions
Earthshine Posted January 12, 2022 Posted January 12, 2022 (edited) also if you want the dll to work, set up a dev vm, and install your product, then put source for the product and dll on the dev test vm. then you can debug your stuff in the debugger. this is the best way to get your dll fixed. debug it on a target with the source code. you probably don't need the app source but I would so you can walk through everything and see what exception is being thrown in the DLL method also add logging to the DLL so you can easily debug using a log file. i do this with everything. makes it lots easier Edited January 12, 2022 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted January 12, 2022 Posted January 12, 2022 oh and is .net 4.8 runtime installed on the test target? My resources are limited. You must ask the right questions
dstrong Posted January 12, 2022 Author Posted January 12, 2022 Yes, I have .net 4.8 runtime installed on the test system. The main problem I have is with 4.8, the AutoIt ObjCreate call fails, but runs without error when I uninstall 4.8 and use 4.7.2.
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