Further than I expected, but could not pass a Everything_GetResultSize hurdle: what type of struct is being used here? And how to translate that to AHK? Tried several syntaxes, but obviously all non working. Could not even get an error code (getlasterror)
Left it as-is in the following working script:
Code: Select all
; Init
EverythingDll := "Everything64.dll"
EverythingLib := DllCall("LoadLibrary", "Str", A_ScriptDir . "\" . EverythingDll, "Ptr")
; Set Search
DllCall(EverythingDll . "\Everything_SetSearch", "Str", "exact:everything64.exe")
; Execute Search and wait till done
DllCall(EverythingDll . "\Everything_Query", "Int", True)
; Parse results
Loop % DllCall(EverythingDll . "\Everything_GetNumResults", "UInt")
{
MsgBox % DllCall(EverythingDll . "\Everything_GetResultFileName", "UInt", A_Index - 1, "Str") . "`n"
. "Path: " . DllCall(EverythingDll . "\Everything_GetResultPath", "UInt", A_Index - 1, "Str") . "`n"
. "Size: " . DllCall(EverythingDll . "\Everything_GetResultSize", "UInt", A_Index - 1, "UInt", &SIZE)
}
; Cleanup
DllCall(EverythingDll . "\Everything_Reset")
DllCall("FreeLibrary", "Ptr", EverythingLib)