An application can call DSearchJob::VetoThisItem from the OnFound callback to prevent the item from being included in search results. An application can call DSearchJob::SetItemScore from the OnFound callback to change the item score in search results.
Example
CMySearchJob : publicDSearchJob {
public:
...
virtualvoidOnError(long errorCode, constchar *msg) {
// First call base class implementation
DSearchJob::OnError(errorCode, msg);
// Now show the message to the user
CString csMsg = GetMyErrorForErrorCode(errorCode);
ShowMessageToUser(csMsg);
}
virtualvoid OnFound(long totalFiles, long totalHits,
constchar *name, long hitsInFile, dtsSearchResultsItem& item) {
// First call base class implementation
DSearchJob::OnFound(totalFiles, totalHits, name, hitsInFile, item);
// Now show the file to the user
ShowFoundFileToUser(name);
}
};