Jump to content

Recommended Posts

Posted

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.

 

 

Posted

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 😂

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...