voidtools

Everything_GetResultHighlightedPath

The Everything_GetResultHighlightedPath function retrieves the highlighted path part of the visible result.


Syntax

LPCTSTR Everything_GetResultHighlightedPath(
int index
);

Parameters

index

Zero based index of the visible result.


Return Value

The function returns a pointer to a null terminated string of TCHARs.

If the function fails the return value is NULL. To get extended error information, call Everything_GetLastError.


Error codeMeaning
EVERYTHING_ERROR_INVALIDCALLCall Everything_Query before calling Everything_GetResultHighlightedPath.
EVERYTHING_ERROR_INVALIDREQUESTHighlighted path information was not requested or is unavailable, Call Everything_SetRequestFlags with EVERYTHING_REQUEST_DATE_HIGHLIGHTED_PATH before calling Everything_Query.
EVERYTHING_ERROR_INVALIDINDEXindex must be greater than or equal to 0 and less than the visible number of results.

Remarks

The ANSI / Unicode version of this function must match the ANSI / Unicode version of the call to Everything_Query.

The function returns a pointer to an internal structure that is only valid until the next call to Everything_Query or Everything_Reset.

You can only call this function for a visible result. To determine if a result is visible use the Everything_GetNumFileResults function.

Text inside a * quote is highlighted, two consecutive *'s is a single literal *.

For example, in the highlighted text: abc *123* the 123 part is highlighted.


Example

// set the search text to abc AND 123
Everything_SetSearch("abc 123");

// execute the query
Everything_Query(TRUE);

// Get the highlighted path of the first visible result.
LPCTSTR lpHighlightedPath = Everything_GetResultHighlightedPath(0);

Function Information

Requires Everything 1.4.1 or later.


See Also


© 2017 - Privacy