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.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.
#DllLoad directive to preload DLLs Topic is solved
#DllLoad directive to preload DLLs
Re: #DllLoad directive to preload DLLs Topic is solved
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.
Who is online
Users browsing this forum: No registered users and 44 guests