Code: Select all
Everything_Reset();
// process-wide; will allow me to be elevated when service client is unelevated
Everything_SetSearch(psearch);
Everything_SetMatchCase(match_case);
Everything_SetRegex(regex);
Everything_SetMatchPath(match_path);
Everything_SetMatchWholeWord(match_whole_word);
Everything_SetMax(sort ? EVERYTHING_MAX_RESULTS : num);
//Printf(L"match_path = %d\r\n", Everything_GetMatchPath());
if ( !Everything_QueryW(TRUE) )
{
Qprintf(STD_ERR, L"Everything_Query error: %lu\r\n", Everything_GetLastError());
goto exit;
}
Beep(440,200);
// output results here
Everything_Reset();
Everything_CleanUp();
return rv;
When the DLL loaded is the one from the current SDK (2022-04-07, 94336 bytes) the ES command works only the first time; I hear the beep, see the output, and the shell returns to its prompt. The second time it fails; I don't hear the beep, there's no output (obviously) and the process is left using all of one processor and can't be interrupted.
When the DLL loaded is an older one (2017-03-22, 84,992 bytes) the ES command works any number of times.
The shell itself has some built-in Everything capabilities but it is not dynamically linked to an Everything DLL.