More DECLARE DLL performance discussion
In this post DECLARE DLL performance questions I asked whether using the WIN32API keyword or the particular DLL file name would be faster. It turns out that Win32API is much faster, and Martin Jindra, Timo, and Fabio Lunardon answered correctly that with Win32API, VFP doesn’t have to deal with files at all, but rather just DLLs that are already loaded.
Instead of dealing with files, DECLARE DLL for a Win32API calls the much faster GetModuleHandle to find the handle for the already loaded DLL.
Fabio goes on to ask whether the “A” feature can be restricted to Win32API calls. However, this is very difficult, because the DLLs that comprise the Win32API are not constant from Windows version to Windows version. For example, the VFP GETDIR() function calls the SHBrowseForFolder API, which is implemented in Shell32.dll.