/*
Function .......: DllOpen(LibFileName)
Parameters .....: LibFileName -> The name of the module. This can be either a library module (a .dll file) or an executable module (an .exe file).
Return Value ...: - If the function succeeds, the return value is a handle to the module.
- If the function fails, the return value is NULL.
AHK Source .....: Calls internally LoadLibrary function
*/
hModule := DllOpen("DllFile.dll")

Hi jNizM. An even simpler alternative was already added to AHK v2, see #DllLoad. Unlke any dll loaded at run time, using #DllLoad enables the built-in optimisation for dllcalls which first parameter is a quoted string.

An even simpler alternative was already added to AHK v2, see #DllLoad. Unlke any dll loaded at run time, using #DllLoad enables the built-in optimisation for dllcalls which first parameter is a quoted string.