#DllLoad directive to preload DLLs

Propose new features and changes
just me
Posts: 6488
Joined: 02 Oct 2013, 08:51
Location: Germany

#DllLoad directive to preload DLLs

22 Jul 2014, 09:43

The docs wrote: DllCall()
Performance
[AHK_L 31+]: If DllCall's first parameter is a literal string such as "MulDiv" and the DLL containing the function is ordinarily loaded before the script starts, the string is automatically resolved to a function address. This built-in optimization is more effective than the example shown above.
This optimization seems to work only for DLLs loaded by AHK but not for DLLs loaded per DllCall("LoadLibrary", ...) within the script. A #DllLoad directive evaluated before the expression parser is called should solve this problem. Also, missing DLLs could be detected at load-time.
lexikos
Posts: 6613
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: #DllLoad directive to preload DLLs

10 May 2019, 16:17

I was going through my notes and found a reference to this topic. You may like to know that Helgef implements this (under the name #LoadLibrary) in PR #136.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 7 guests