Using the COM Interface

AutoIt X

Using the DLL Interface

AutoItX can be used as a standard DLL from any language capable of calling functions in external DLLs.

 

The following files are provided to allow you to use the DLL in C++:

AutoItX3_DLL.h - C language header file showing the exported functions and parameters

AutoItX3_DLL.lib - Microsoft format import library (x86)

AutoItX3_x64_DLL.lib - Microsoft format import library (x64)

AutoItX3.dll - The main AutoItX DLL (x86)

AutoItX3_x64.dll - The main AutoItX DLL (x64)

 

Documentation for each function is not provided as the function calls are similar to the COM version and it should be easy to work out what is required with the COM documentation and the header file. The main difference to the COM version is that the functions that receive text - such as AU3_WinGetTitle have an additional parameter called nBufSize - this should be set to the available size of the output text buffer.

e.g. The prototype for AU3_WinGetText is:

void AU3_WinGetTitle(LPCWSTR szTitle, LPCWSTR szText, LPWSTR szRetText, int nBufSize);

 

The return buffer is szRetText, and an example (C++ language) usage would be:

WCHAR szMyTitle[200];

AU3_WinGetTitle("Untitled - Notepad", "", szMyTitle, 200);

MessageBox(NULL, szMyTitle, "Returned window title was:", MB_OK);

 

nBufSize is simply used to avoid buffer overruns in any text that is passed back.