SDK/Everything GetResultFullPathName

From Wiki

< SDK
Jump to: navigation, search

Everything_GetResultFullPathName

The Everything_GetResultFullPathName function retrieves the full path and file name of the visible result.


Syntax

int Everything_GetResultFullPathName(int index,LPTSTR lpString,int nMaxCount);


Parameters

index
[in] Zero based index of the visible result.
lpString
[out] 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.
nMaxCount
[in] Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.


Return Value

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.
Error code Meaning
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.


Remarks

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.


Example

// 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));


Function Information

DLL Requires Everything.dll
Header Declared in Everything.h, include Everything.h
Library Link to Everything.lib
Unicode Implemented as Everything_GetResultFullPathNameW (Unicode) and Everything_GetResultFullPathNameA (ANSI).


See Also

Personal tools