The Everything_GetResultFullPathName function retrieves the full path and file name of the visible result.
DWORD Everything_GetResultFullPathName( DWORD index, LPTSTR lpString, DWORD nMaxCount );
Zero based index of the visible result.
Pointer to the buffer that will receive the text. If the string is as long or longer than the buffer, the string is truncated and terminated with a NULL character.
Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.
If lpString is NULL, the return value is the number of TCHARs excluding the null terminator needed to store the full path and file name of the visible result.
If lpString is not NULL, the return value is the number of TCHARs excluding the null terminator copied into lpString.
If the function fails the return value is 0. To get extended error information, call Everything_GetLastError.
|EVERYTHING_ERROR_INVALIDCALL||Call Everything_Query before calling Everything_GetResultFullPathName.|
|EVERYTHING_ERROR_INVALIDINDEX||index must be greater than or equal to 0 and less than the visible number of results.|
You can only call this function for a visible result. To determine if a result is visible use the Everything_GetNumFileResults function.
You can mix ANSI / Unicode versions of Everything_GetResultFullPathName and Everything_Query.
// set the search text to abc AND 123 Everything_SetSearch("abc 123"); // execute the query Everything_Query(TRUE); // Get the full path and file name of the first visible result. Everything_GetResultFullPathName(0,buf,sizeof(buf));