list of handy dll functions

Helpful script writing tricks and HowTo's
User avatar
jeeswg
Posts: 2662
Joined: 19 Dec 2016, 01:58
Location: UK

list of handy dll functions

04 Jul 2017, 12:32

See also:
list of dll functions with parameter types for DllCall - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=30832

A list of handy dll functions based on DllCall lines found in multiple scripts and libraries, and from functions inside the AutoHotkey source code.

The full list is in the post below.
list of handy dll functions - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=34017&p=157581#p157581

==================================================

LINKS:
list of dll functions with parameter types for DllCall - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=30832
WinApi
https://hotkeyit.github.io/v2/docs/commands/WinApi.htm
GitHub - Lexikos/AutoHotkey_L: AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.
https://github.com/Lexikos/AutoHotkey_L
WinApi, DllCalls & AHK - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=406

==================================================

NOTES:
- For each dll, I used the lowercase version of the dll name. All of the dll files (in the system32 folder) had lowercase names except for 'Magnification' and 'IPHLPAPI'.
- I added 'gui dc' for any function whose definition in https://hotkeyit.github.io/v2/docs/commands/WinApi.htm contained 'hDC' (handle to a device context).

POSSIBLE FUTURE IMPROVEMENTS:
- To add 'deprecated'/'no MSDN page' where appropriate or as separate lists.
- A separate list, AHK commands/functions/variables and related dll functions.

SUFFIXES:
- The suffixes 'A/W' indicate ANSI/wide (Unicode).
- The suffix 'Ex' indicates extended (e.g. RegisterClassEx is similar to RegisterClass, but has more functionality).

CASE DIFFERS (FUNCTION NAMES): 'A' v. 'W' versions:
freeaddrinfo/FreeAddrInfoW
getaddrinfo/GetAddrInfoW
socket/SocketA
socket/SocketW

CASE DIFFERS (FUNCTION NAMES): MSDN V. DLL EXPORT:
(note: in the list above I used the case as exported by the dll, except for the following functions where I used the MSDN version:)
dll: (from MSDN)/(from dll)
msvcrt: strftime/Strftime
user32: EndMenuA/endMenuA
user32: EndMenuW/endMenuW
user32: RegisterShellHookWindow/registerShellHookWindow
user32: SetRect/setRect
user32: ValidateRect/validateRect
ws2_32: accept/Accept
ws2_32: connect/Connect
ws2_32: gethostbyname/GetHostByName
ws2_32: htons/Htons
ws2_32: recv/Recv
ws2_32: select/Select
ws2_32: send/Send

DLLS WITH VARIATIONS:
C:\WINDOWS\system32\atl.dll
C:\WINDOWS\system32\atl100.dll
C:\WINDOWS\system32\atl110.dll

FUNCTIONS THAT APPEAR IN MORE THAN ONE DLL:
GetModuleBaseName: kernel32/psapi
GetProcessImageFileName: kernel32/psapi

==================================================

DLL LISTS: GUI (CREATE WINDOWS/CONTROLS):
- RegisterClassEx
- CreateWindowEx

DLL LISTS: GUI (GET/SET EXTERNAL CONTROL TEXT):
- OpenProcess
- VirtualAllocEx
- WriteProcessMemory
- ReadProcessMemory
- VirtualFreeEx
- CloseHandle

DLL LISTS: DATE/TIME:
- GetLocalTime (time now: local SYSTEMTIME)
- GetSystemTime (time now: UTC SYSTEMTIME)
- (no handy function?) (time now: local FILETIME)
- GetSystemTimeAsFileTime (time now: UTC FILETIME)
- FileTimeToLocalFileTime (convert UTC FILETIME to local FILETIME)
- LocalFileTimeToFileTime (convert local FILETIME to UTC FILETIME)
- SystemTimeToFileTime (convert SYSTEMTIME TO FILETIME)
- FileTimeToSystemTime (convert FILETIME TO SYSTEMTIME)

DLL LISTS: TEXT:
- CryptBinaryToString/CryptStringToBinary (convert between binary data/hex/base64)
- GetPrivateProfileString/WritePrivateProfileString (ini read/write)
- IsTextUnicode ('Bush hid the facts' bug)
- LCMapString (convert between UTF-16 little endian/big endian)
- MultiByteToWideChar/WideCharToMultiByte (convert between ANSI/UTF-8/UTF-16 little endian)

==================================================

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



==================================================

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by jeeswg on 21 Aug 2017, 17:48, edited 2 times in total.
User avatar
jeeswg
Posts: 2662
Joined: 19 Dec 2016, 01:58
Location: UK

Re: list of handy dll functions

04 Jul 2017, 12:33

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest