mjolnirmarkiv Posted March 3, 2017 Share Posted March 3, 2017 Hi! Is there any way to use .NET DLL libraries with AutoIt? I happen to have one that'd have made my life easier, but DLLCall() returns an error: no functions with such name found. Searching and reading forums made me think that's not a fault of a library. I've used yashied's DLL Helper, but it didn't return any function names as well. Thanks! Link to comment Share on other sites More sharing options...
JohnOne Posted March 3, 2017 Share Posted March 3, 2017 (edited) I don't believe c# libraries have classic entry points like unmanaged dlls, so dllcall will not work. I think I recall you have to make your dll com visible and use as an object, you should search it, there is something on the forum about it. EDIT: .NET CLR is nowadays possible. Edited August 27, 2017 by JohnOne mjolnirmarkiv and MarketingWithKyle 1 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ptrex Posted March 3, 2017 Share Posted March 3, 2017 (edited) At the moment there is no way to access .NET libraries natively... 2 Options left : 1. If this is a custom developed .NET libr. make it COM Visible as JohnOne indicated. 2. If you are looking for accessing .NET Class Libraries, you can use the PowerShell COM library as middleware... See my signature. I am looking into how we could still achieve this to access it natively. But some highly skilled forum members has already let me know that this will not be an easy task.... It could be achieved by using the ObjCreateInterface and reading a lot on MSDN ... It is NOW POSSIBLE TO ACCESS .NET Classes / THIRD PARTY ASSEMBLIES / POWERSHELL Cmdlets and MODULES See here on 'how to' Examples : All members are welcome to contribute and help in any way they can ... Rgds ptrex Edited June 9, 2017 by ptrex MarketingWithKyle and mjolnirmarkiv 1 1 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
junkew Posted March 3, 2017 Share Posted March 3, 2017 (edited) 23-april-2017 initial au3 library posted in examples section over here https://www.autoitscript.com/forum/topic/188158-net-common-language-runtime-clr-framework/ Introduction In this whole tread posts 1-180 a lot of learning material which I try to summarize in this post 4. Around post 180 we had a working version ready for examples section to ask more help from others to enhance the UDF a. Make use / enhance for more examples (the enduser of the udf --> see examples section in forum) b. Host the CLR runtime in a better more documented way (the technical side of the udf in this thread) Reflection and related concepts Important area in integrating interfaces, types, dynamic and related concepts all relate to reflection http://www.codeproject.com/Articles/55710/Reflection-in-NET For this we need System.Reflection.Assembly and related methods like gettype_2 and createinstanceXXXTODO Find out: System.Activator and important methods to createInstanceXXX For starters Advice to first understand high level COM concepts before you step to .NEThttps://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?do=findComment&comment=1345621 Summary post 1-180 Hosting the CLR in CPP / Microsoft referenceshttps://code.msdn.microsoft.com/CppHostCLR-e6581ee0https://technet.microsoft.com/nl-nl/library/ms164408 Summarized start of udf in post 68https://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?page=4#comment-1348019 First working example of hosting .NET in post #25 #28 #29 of this threadhttps://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?page=2#comment-1346495 Some tips on the interface definitions post #33 https://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?page=2#comment-1346569 Some example in C++ and VBA to be transformed to AutoIt in post #39https://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?page=2#comment-1346697 An approach by compiling in .NEThttps://www.autoitscript.com/forum/topic/166704-net-compiled-dll-assembly-in-autoit-the-simple-approach/ Lots of reading references in post #47,#48, #49 The common language interface CLI standard ECMA 335https://www.ecma-international.org/publications/standards/Ecma-335.htm some nice code project referenceshttps://www.codeproject.com/Articles/607352/Injecting-Net-Assemblies-Into-Unmanaged-Processes Some references on how other scripting languages deal with .NET Hp uft vbscript http://www.learnqtp.com/dotnetfactory-qtp-part7-arraylist/ PHP http://php.net/manual/en/class.dotnet.php Visual foxpro https://west-wind.com/wwdotnetbridge.aspx and http://foxcentral.net/microsoft/netforvfpdevelopers.htm powerbasic https://forum.powerbasic.com/forum/user-to-user-discussions/programming-with-objects/47869-passing-interface-to-function-to-be-created?p=567769#post567769 Summary in post #116https://www.autoitscript.com/forum/topic/187334-using-net-libary-with-autoit-possible/?page=6#comment-1349309 Technical background Some other relevant articles related to AutoIt and this CLR stuff MSCorEE.DLL and MSCORLIB.DLL by googling the internet Books to read http://www.charlespetzold.com/dotnet/ A must read free pdf for understanding .net .NET CLR via C#https://www.amazon.com/CLR-via-4th-Developer-Reference/dp/0735667454 free chapters 21,22,23 can be found on the internet Lengthy list of references used in the thread (clean / sort later in a logical order) http:// https://autohotkey.com/boards/viewtopic.php?t=4633 https://code.msdn.microsoft.com/windowsdesktop/CppHostCLR-e6581ee0http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/320083-guide-loading-net-4-0-clr.html https://blogs.msdn.microsoft.com/carlos/2013/08/23/loading-multiple-clr-runtimes-inproc-sxs-sample-code/ Small dll's so you can use it without registering .NET classed as comhttps://soraco.co/quick-license-manager/vba-dotnet/ Call .NET methods from VBAhttp://stackoverflow.com/questions/37074533/how-to-call-net-methods-from-excel-vba Register the .NET classes with regasmhttps://msdn.microsoft.com/en-us/library/zsfww439(v=vs.100).aspx Edited April 23, 2017 by junkew Overview of this thread till post 180 mjolnirmarkiv and LukeLe 1 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Iczer Posted March 3, 2017 Share Posted March 3, 2017 Maybe this topic would be some help for you: .NET compiled dll assembly in AutoIt, the simple approach! mjolnirmarkiv 1 Link to comment Share on other sites More sharing options...
junkew Posted March 3, 2017 Share Posted March 3, 2017 (edited) For starters in COM https://www.codeproject.com/Articles/13601/COM-in-plain-C https://www.codeproject.com/Articles/13862/COM-in-plain-C-Part https://www.codeproject.com/Articles/14037/COM-in-plain-C-Part https://www.codeproject.com/Articles/14117/COM-in-plain-C-Part https://www.codeproject.com/Articles/14183/COM-in-plain-C-Part https://www.codeproject.com/Articles/14905/COM-in-plain-C-Part https://www.codeproject.com/Articles/15037/COM-in-plain-C-Part https://www.codeproject.com/Articles/17038/COM-in-plain-C-part Studying this udf gives more understanding for defining and getting the interfaces and reflection / metadata from AutoIt https://www.autoitscript.com/forum/topic/114498-typelibinspector-oleview-was-yesterday/?page=2#comment-1048903 https://www.autoitscript.com/forum/topic/112992-tliau3-type-information-on-com-objects-tlbinf-emulation/#comment-791089 AutoIt Object udf (AIO) Excellent resource for studying on how to do more complex thing that AutoIt did not offer out of the box for creating objects. When learning a lot in this thread this AIO udf was also excellent area to see how Variant/COM stuff is implemented in AutoIt by using oleaut32.dll https://www.autoitscript.com/forum/topic/110379-autoitobject-udf/#comment-775262https://msdn.microsoft.com/en-us/library/windows/desktop/ms221673(v=vs.85).aspx For me its a little unclear how AIO relates nowadays to objCreateInterface ; Declare the CLSID, IID and interface description for ITaskbarList. ; It is not necessary to describe the members of IUnknown. Local Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}" Local Const $sIID_ITaskbarList = "{56FDF342-FD6D-11D0-958A-006097C9A090}" Local Const $sTagITaskbarList = "HrInit hresult(); AddTab hresult(hwnd); DeleteTab hresult(hwnd); ActivateTab hresult(hwnd); SetActiveAlt hresult(hwnd);" ; Create the object. Local $oTaskbarList = ObjCreateInterface($sCLSID_TaskbarList, $sIID_ITaskbarList, $sTagITaskbarList) ; Initialize the iTaskbarList object. $oTaskbarList.HrInit() SafeArray udf https://www.autoitscript.com/forum/topic/185883-accessing-autoit-variables/#comment-1335030 Edited April 23, 2017 by junkew mjolnirmarkiv 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
junkew Posted March 4, 2017 Share Posted March 4, 2017 lets see how far we will come https://code.msdn.microsoft.com/windowsdesktop/CppHostCLR-e6581ee0 http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/320083-guide-loading-net-4-0-clr.html https://blogs.msdn.microsoft.com/carlos/2013/08/23/loading-multiple-clr-runtimes-inproc-sxs-sample-code/ FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
junkew Posted March 4, 2017 Share Posted March 4, 2017 Without above fixed for latest AutoIt its probably hard to generate the interfaces based on the tlb from mscoree FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
LarsJ Posted March 5, 2017 Share Posted March 5, 2017 (edited) headerFiles.7z: metahost.h mscoree-2.h (.NET v2) mscoree-4.h (.NET v4) mscorlib.tlh (_AppDomain interface) Edited March 18, 2017 by LarsJ Zip file removed Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
ptrex Posted March 5, 2017 Share Posted March 5, 2017 This is a bit more readable ? https://forum.powerbasic.com/forum/user-to-user-discussions/programming-with-objects/47869-passing-interface-to-function-to-be-created?p=567769#post567769 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
LarsJ Posted March 5, 2017 Share Posted March 5, 2017 Zip file in the post 9 is updated. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
junkew Posted March 5, 2017 Share Posted March 5, 2017 Not sure what the definition will be of using .NET in AutoIt Maybe some examples on what people want to see working from AutoIt and how? There are solutions like Small dll's so you can use it without registering .NET classed as com https://soraco.co/quick-license-manager/vba-dotnet/ http://stackoverflow.com/questions/37074533/how-to-call-net-methods-from-excel-vba Register the .NET classes with regasm https://msdn.microsoft.com/en-us/library/zsfww439(v=vs.100).aspx but probably the requirement is to host the CLR https://technet.microsoft.com/nl-nl/library/ms164408 attention points I remember something on passing byref and byvalue leads to issues in AutoIt and reading on .NET / COM interop thats frequently needed. MSCorEE.DLL (and related tlb) is unmanaged and should be possible to deal with from AutoIt (complexity similar to AIO) MSCorLibl.DLL is managed code and contains all the classed people probably want to call directly/instantiate from ObjCreateInterface which I doubt is possible. Probably smart to ask some of the AIO programmers their perspective on this if its possible at all. My bet would be on building stuff in a .NET language and expose it with a REST JSON API interface. asier and probably better nowadays to make API's in JSON or SOAP XML. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
ptrex Posted March 6, 2017 Share Posted March 6, 2017 Hi Junkew, 2 main reasons why to get this going : 1. Access to the .NET Class Libraries opens up a new world ! System System.Collections System.Data System.Drawing System.IO System.Text System.Threading System.Timers System.Web System.Web.Services System.Windows.Forms System.Xml 2. Accessing custom build .Net libraries will be and extension to the current au3 functionality, Some Examples (but there are a ton out there) - JSonToXML libr. - XMLRPC Libr. - .NETPDF libr. - .NETOCR Libr - WInSCP Libr. - ... Something like this are practical examples : http://www.learnqtp.com/dotnetfactory-qtp-part1-basics/ Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ptrex Posted March 6, 2017 Share Posted March 6, 2017 So far this is the status:When using the ObjCreateInterface : $CLSID_CLRMetaHost = "{9280188D-0E8E-4867-B30C-7FA83884E8DE}" $IID_ICLRDebugging = "{D28F3C5A-9634-4206-A509-477552EEFB10}" $IID_ICLRDebuggingLibraryProvider = "{3151C08D-4D09-4F9B-8838-2880BF18FE51}" $IID_ICLRMetaHost = "{D332DB9E-B9B3-4125-8207-A14884F53216}" $IID_ICLRMetaHostPolicy = "{E2190695-77B2-492E-8E14-C4B3A7FDD593}" $IID_ICLRProfiling = "{B349ABE3-B56F-4689-BFCD-76BF39D888EA}" $IID_ICLRRuntimeInfo = "{BD39D1D2-BA2F-486A-89B0-B4B0CB466891}" $IID_ICLRStrongName = "{9FD93CCF-3280-4391-B3A9-96E1CDE77C8D}" $IID_IEnumUnknown = "{00000100-0000-0000-C000-000000000046}" $IID_ISequentialStream = "{0C733A30-2A1C-11CE-ADE5-00AA0044773D}" $IID_IStream = "{0000000C-0000-0000-C000-000000000046}" $dtag = "" $hRet = ObjCreateInterface($CLSID_CLRMetaHost, $IID_ICLRMetaHost , $dtag) ConsoleWrite(IsObj($hRet) & @CRLF) No result it does not create an Object, because the mscoree.dll is not a COM object that is registered. Using the Create Object direct access method : expandcollapse popup#AutoIt3Wrapper_UseX64=y Global $CLSID_CLRMetaHost = "{9280188D-0E8E-4867-B30C-7FA83884E8DE}" Global $IID_ICLRDebugging = "{D28F3C5A-9634-4206-A509-477552EEFB10}" Global $IID_ICLRDebuggingLibraryProvider = "{3151C08D-4D09-4F9B-8838-2880BF18FE51}" Global $IID_ICLRMetaHost = "{D332DB9E-B9B3-4125-8207-A14884F53216}" Global $IID_ICLRMetaHostPolicy = "{E2190695-77B2-492E-8E14-C4B3A7FDD593}" Global $IID_ICLRProfiling = "{B349ABE3-B56F-4689-BFCD-76BF39D888EA}" Global $IID_ICLRRuntimeInfo = "{BD39D1D2-BA2F-486A-89B0-B4B0CB466891}" Global $IID_ICLRStrongName = "{9FD93CCF-3280-4391-B3A9-96E1CDE77C8D}" Global $IID_IEnumUnknown = "{00000100-0000-0000-C000-000000000046}" Global $IID_ISequentialStream = "{0C733A30-2A1C-11CE-ADE5-00AA0044773D}" Global $IID_IStream = "{0000000C-0000-0000-C000-000000000046}" Global $hActiveX ; Load the server module If @AutoItX64 Then $hActiveX = DllOpen("C:\Windows\system32\mscoree.dll") Else $hActiveX = DllOpen("C:\Windows\system32\mscoree.dll") EndIf ;MsgBox(0,"x64",@AutoItX64) ; Object identifiers Global Const $sCLSID = "{9280188D-0E8E-4867-B30C-7FA83884E8DE}" Global Const $sIID = "{D332DB9E-B9B3-4125-8207-A14884F53216}" ;Global Const $sIID = Default ; Or use keyword Default if you want to use the Default interface ID ; Error monitoring Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF) Return EndFunc ;==>_ErrFunc ; Create the hActiveX Local $oNET = ObjCreate($sCLSID, $sIID, $hActiveX) If $oNET = 0 Then MsgBox(16,"Error", "Could not create the object, Common problem ActiveX not registered.") $oNET = "" DllClose($hActiveX) No result either because the mscoree.dll is not an COM visible library... In the C:\Windows\Microsoft.NET Framework folders you can find the mscoree.tlb type libr. file as well as the mscorlib.tlb one If you open it using the trancexx TypeLib Viewer You can see all the CLSID / IID's See file encloed : mscoree; // Common Language Runtime Execution Engine 2.4 Library Some more developers expertise is needed here to point on... rgds ptrex Common Language Runtime Execution Engine 2.4 Library.txt Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ptrex Posted March 6, 2017 Share Posted March 6, 2017 Using a wrapper around a wrapper of a wrapper .... I was able to get the CLRHost running Quote FriendlyName : DefaultDomain Id : 1 ApplicationDescription : BaseDirectory : C:\Program Files (x86)\AutoIt3\beta\ DynamicDirectory : RelativeSearchPath : SetupInformation : System.AppDomainSetup ShadowCopyFiles : False But this is not the way to go ! I hope that some of the devolopers reach out to give us a hand... rgds ptrex JohnOne 1 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
LarsJ Posted March 6, 2017 Share Posted March 6, 2017 ptrex, A little comment to post 14. You must use CLRCreateInstance to get a pointer to ICLRMetaHost. And then use this pointer in ObjCreateInterface. But still a long way to go. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
ptrex Posted March 6, 2017 Share Posted March 6, 2017 Hi Lars, Sure I understand, that's why I call in the help of all the smart guys around here Thanks again for all the info you provided already .... Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
junkew Posted March 6, 2017 Share Posted March 6, 2017 @trancexx @guinness @Jos @jpm @Nutster can maybe express their opinion on this thread. @Melba23 maybe move this to developer forum? FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
ptrex Posted March 6, 2017 Share Posted March 6, 2017 #AutoIt3Wrapper_UseX64 = y #include <WinAPI.au3> ; Get handle of the loaded module Local $hModule = _WinAPI_LoadLibraryEx("C:\Windows\System32\mscoree.dll") ConsoleWrite($hModule & @CRLF) If $hModule Then Local $pFunction = _WinAPI_GetProcAddress($hModule, "CLRCreateInstance") ConsoleWrite("The address of the function is " & $pFunction & @CRLF & @CRLF) ; Do whatever here EndIf _WinAPI_FreeLibrary($hModule)) These are the functions in mscoree.dll Quote Section contains the following exports for mscoree.dll 00000000 characteristics 57899178 time date stamp Sat Jul 16 03:44:24 2016 0.00 version 17 ordinal base 126 number of functions 123 number of names ordinal hint RVA name 38 0 000040C0 CLRCreateInstance 39 1 0001B320 CallFunctionShim 21 2 0001A600 CloseCtrs 40 3 0001B490 ClrCreateManagedInstance 41 4 0001B5A0 CoEEShutDownCOM 42 5 0001B670 CoInitializeCor 43 6 0001B760 CoInitializeEE 44 7 0001B850 CoUninitializeCor 45 8 0001B920 CoUninitializeEE 25 9 0001A700 CollectCtrs 46 A 0001BA00 CorBindToCurrentRuntime 47 B 0001BB30 CorBindToRuntime 48 C 0001BCA0 CorBindToRuntimeByCfg 49 D 0001BE10 CorBindToRuntimeByPath 50 E 0001BF10 CorBindToRuntimeByPathEx 51 F 00003E50 CorBindToRuntimeEx 52 10 0001C020 CorBindToRuntimeHost 26 11 0001A820 CorDllMainWorker 53 12 000042E0 CorExitProcess 54 13 0001C1F0 CorGetSvc 55 14 0001C2E0 CorIsLatestSvc 56 15 0001C3E0 CorMarkThreadInThreadPool 57 16 0001C4A0 CorTickleSvc 58 17 00003640 CreateConfigStream 59 18 0001C580 CreateDebuggingInterfaceFromVersion 60 19 00021C50 CreateInterface 61 1A 00004200 DllCanUnloadNow 62 1B 00003FA0 DllGetClassObject 63 1C 0001C690 DllRegisterServer 64 1D 0001C770 DllUnregisterServer 27 1E 0001AA10 EEDllGetClassObjectFromClass 65 1F 0001C850 EEDllRegisterServer 66 20 0001C940 EEDllUnregisterServer 67 21 0001CA30 GetAssemblyMDImport 68 22 00021CF0 GetCLRMetaHost 69 23 0001CB40 GetCORRequiredVersion 70 24 0001CC50 GetCORRootDirectory 71 25 0001CD60 GetCORSystemDirectory 72 26 0001CE70 GetCORVersion 73 27 0001CF80 GetCompileInfo 74 28 0001D060 GetFileVersion 75 29 0001D190 GetHashFromAssemblyFile 76 2A 0001D2E0 GetHashFromAssemblyFileW 77 2B 0001D430 GetHashFromBlob 78 2C 0001D5A0 GetHashFromFile 79 2D 0001D6F0 GetHashFromFileW 80 2E 0001D840 GetHashFromHandle 81 2F 0001D990 GetHostConfigurationFile 82 30 0001DA90 GetMetaDataInternalInterface 83 31 0001DBE0 GetMetaDataInternalInterfaceFromPublic 84 32 0001DCF0 GetMetaDataPublicInterfaceFromInternal 85 33 0001DE00 GetPermissionRequests 28 34 0001AB30 GetPrivateContextsPerfCounters 29 35 000037F0 GetProcessExecutableHeap 86 36 0001DFA0 GetRealProcAddress 87 37 0001E0A0 GetRequestedRuntimeInfo 88 38 0001E2E0 GetRequestedRuntimeVersion 89 39 0001E410 GetRequestedRuntimeVersionForCLSID 30 3A 0001AC10 GetStartupFlags 31 3B 00003CD0 GetTargetForVTableEntry 32 3C 00003BA0 GetTokenForVTableEntry 90 3D 0001E560 GetVersionFromProcess 91 3E 0001E690 GetXMLElement 92 3F 0001E780 GetXMLElementAttribute 93 40 0001E8A0 GetXMLObject 94 41 0001E990 IEE 17 42 0001ACF0 InitErrors 19 43 0001ADD0 InitSSAutoEnterThread 95 44 0001EA70 LoadLibraryShim 96 45 0001EBA0 LoadLibraryWithPolicyShim 22 46 0001ECD0 LoadStringRC 97 47 0001EDF0 LoadStringRCEx 98 48 0002A000 LockClrVersion 33 49 0001AEB0 LogHelp_LogAssert 34 4A 0001AFB0 LogHelp_NoGuiOnAssert 35 4B 0001B090 LogHelp_TerminateOnAssert 99 4C 0001F060 MetaDataGetDispenser 100 4D 0001F170 ND_CopyObjDst 101 4E 0001F290 ND_CopyObjSrc 102 4F 0001F3B0 ND_RI2 103 50 0001F4A0 ND_RI4 104 51 0001F590 ND_RI8 105 52 0001F680 ND_RU1 106 53 0001F770 ND_WI2 107 54 0001F870 ND_WI4 108 55 0001F970 ND_WI8 109 56 0001FA70 ND_WU1 36 57 0001B160 OpenCtrs 18 58 0001A5D0 PostError 23 59 0001FC60 ReOpenMetaDataWithMemory 110 5A 0001FD70 ReOpenMetaDataWithMemoryEx 111 5B 0001FEA0 RunDll32ShimW 112 5C 0001FFD0 RuntimeOSHandle 113 5D 000200D0 RuntimeOpenImage 114 5E 000201D0 RuntimeReleaseHandle 37 5F 00003A70 SetTargetForVTableEntry 115 60 000202C0 StrongNameCompareAssemblies 116 61 000203D0 StrongNameErrorInfo 117 62 000204B0 StrongNameFreeBuffer 118 63 00020590 StrongNameGetBlob 119 64 000206A0 StrongNameGetBlobFromImage 120 65 000207C0 StrongNameGetPublicKey 121 66 00020910 StrongNameHashSize 122 67 00020A00 StrongNameKeyDelete 123 68 00020AF0 StrongNameKeyGen 124 69 00020C10 StrongNameKeyGenEx 125 6A 00020D60 StrongNameKeyInstall 126 6B 00020E70 StrongNameSignatureGeneration 127 6C 00020FE0 StrongNameSignatureGenerationEx 128 6D 00021180 StrongNameSignatureSize 129 6E 00021290 StrongNameSignatureVerification 130 6F 000213A0 StrongNameSignatureVerificationEx 131 70 000214B0 StrongNameSignatureVerificationFromImage 132 71 000215D0 StrongNameTokenFromAssembly 133 72 000216E0 StrongNameTokenFromAssemblyEx 134 73 00021830 StrongNameTokenFromPublicKey 135 74 00021950 TranslateSecurityAttributes 20 75 0001B250 UpdateError 136 76 00003940 _CorDllMain 137 77 000010A0 _CorExeMain 138 78 00021C10 _CorExeMain2 139 79 0000D1F0 _CorImageUnloading 140 7A 0002B410 _CorValidateImage 24 00003740 [NONAME] 142 00003920 [NONAME] Now what's next ... Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
LarsJ Posted March 7, 2017 Share Posted March 7, 2017 junkew, We don't need opinions or chit-chatting. We need code. ptrex, I'll take a look at the code later this afternoon. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
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