B3absi Posted January 8, 2020 Posted January 8, 2020 Hi, i read the docs about how to call dll using autoit DllCall ( "dll", "return type", "function" [, type1, param1 [, type n, param n]] ) but i couldn’t determine the mapping between autoit variables types and c++. i’m looking to call this function https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifileoperation-copyitem HRESULT CopyItem( IShellItem *psiItem, IShellItem *psiDestinationFolder, LPCWSTR pszCopyName, IFileOperationProgressSink *pfopsItem ); How can define these specific structs using Autoit, help me with this one thanks in advance.
Nine Posted January 8, 2020 Posted January 8, 2020 You provided a link from a header, not a dll. “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
B3absi Posted January 8, 2020 Author Posted January 8, 2020 According to stackoverflow A DLL doesn't need to export anything special to implement that interface. The registry tells the OS what DLL implements the interface. When a program calls CoCreateInstance, the OS can look up the given CLSID in the registry. The OS then loads the associated DLL and calls its DllGetClassObject function to get an IClassFactory object. The OS then uses that interface to get something that implements the requested interface. where’s m i supposed to find the dll name to use that interface 😂
LarsJ Posted January 8, 2020 Posted January 8, 2020 The DllCall() function cannot be used for interface methods. But the C++ code in the example in your link can be translated into AutoIt code. Use ObjCreateInterface() for interfaces. However, the translation is not completely trivial if you have no experience with ObjCreateInterface() and related techniques. And not at all if you have no experience with AutoIt either. 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
markyrocks Posted January 9, 2020 Posted January 9, 2020 (edited) So what exactly are you trying to do? Copy a file?😁 Edited January 9, 2020 by markyrocks Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning"
B3absi Posted January 9, 2020 Author Posted January 9, 2020 10 hours ago, markyrocks said: So what exactly are you trying to do? Copy a file?😁 Yes using those api’s
Nine Posted January 9, 2020 Posted January 9, 2020 If you want to use COM object, I suggest you use object shell.application instead of interfaces. It will save you time and effort, and you get to have essentially the same functionality. “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
markyrocks Posted January 9, 2020 Posted January 9, 2020 6 hours ago, B3absi said: Yes using those api’s Sometimes it's just easier to use c++ than to put a square peg in a round hole and go around in circles trying to get something to work on autoit. Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning"
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