Windows API
All the Windows API details you need can be found by searching at MSDN Library
Common Datatypes
AutoIt has a single datatype - the variant. A variant can hold HWNDs (window handles), integers (32 and 64bit), floating point numbers (doubles). Windows API calls take many different sorts of datatypes and in the DllCall function you must work out which type to use for conversion.
Complete list of Windows Datatypes
Windows Datatype = DllCall Type
BOOL = "int"
COLORREF = "int"
DWORD = "int"
HANDLE = "ptr"
HDC = "ptr"
HFILE = "int"
HFONT = "ptr"
HICON = "ptr"
HINSTANCE = "ptr"
HKEY = "ptr"
HMENU = "ptr"
HMODILE = "ptr"
HWND = "hwnd"
INT = "int"
LONG = "long"
LPARAM = "long"
LPCTSTR = "str" ("wstr" if a UNICODE function)
LPINT = "int_ptr"
LPLONG = "long_ptr"
UINT = "int"
ULONG = "long"
WPARAM = "int"
API List
Here is a list of API functions that have been used successfully in AutoIt and their respective DllCall syntax.
GetAsyncKeyState - DllCall("user32.dll", "int", "GetAsyncKeyState", "int", $hexKey)
GetTickCount - DllCall("kernel32.dll", "long", "GetTickCount")
MessageBeep - DllCall ("user32.dll", "int", "MessageBeep", "int", 0xFFFFFFFF)
MessageBox - DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "text", "str", "title", "int", 0)
PrintUI /? - DllCall("printui.dll", "none", "PrintUIEntryW", "hwnd", 0, "ptr", 0, "wstr", "/?", "int", @SW_SHOWNORMAL)
Edited by Jon, 30 December 2004 - 11:50 AM.




This topic is locked

