看到一个使用EverythingSDK的文章:
https://www.cnblogs.com/masg/p/16251099.html
但博主没有发Everything.pas单元,我根据Everything.h转了一个,可以用。
unit Everything; interface uses Windows; const EVERYTHING_OK = 0; {// no error detected} EVERYTHING_ERROR_MEMORY = 1; {// out of memory.} EVERYTHING_ERROR_IPC = 2; {// Everything search client is not running} EVERYTHING_ERROR_REGISTERCLASSEX = 3; {// unable to register window class.} EVERYTHING_ERROR_CREATEWINDOW = 4; {// unable to create listening window} EVERYTHING_ERROR_CREATETHREAD = 5; {// unable to create listening thread} EVERYTHING_ERROR_INVALIDINDEX = 6; {// invalid index} EVERYTHING_ERROR_INVALIDCALL = 7; {// invalid call} EVERYTHING_ERROR_INVALIDREQUEST = 8; {// invalid request data, request data first.} EVERYTHING_ERROR_INVALIDPARAMETER = 9; {// bad parameter.} EVERYTHING_SORT_NAME_ASCENDING = 1; EVERYTHING_SORT_NAME_DESCENDING = 2; EVERYTHING_SORT_PATH_ASCENDING = 3; EVERYTHING_SORT_PATH_DESCENDING = 4; EVERYTHING_SORT_SIZE_ASCENDING = 5; EVERYTHING_SORT_SIZE_DESCENDING = 6; EVERYTHING_SORT_EXTENSION_ASCENDING = 7; EVERYTHING_SORT_EXTENSION_DESCENDING = 8; EVERYTHING_SORT_TYPE_NAME_ASCENDING = 9; EVERYTHING_SORT_TYPE_NAME_DESCENDING = 10; EVERYTHING_SORT_DATE_CREATED_ASCENDING = 11; EVERYTHING_SORT_DATE_CREATED_DESCENDING = 12; EVERYTHING_SORT_DATE_MODIFIED_ASCENDING = 13; EVERYTHING_SORT_DATE_MODIFIED_DESCENDING = 14; EVERYTHING_SORT_ATTRIBUTES_ASCENDING = 15; EVERYTHING_SORT_ATTRIBUTES_DESCENDING = 16; EVERYTHING_SORT_FILE_LIST_FILENAME_ASCENDING = 17; EVERYTHING_SORT_FILE_LIST_FILENAME_DESCENDING = 18; EVERYTHING_SORT_RUN_COUNT_ASCENDING = 19; EVERYTHING_SORT_RUN_COUNT_DESCENDING = 20; EVERYTHING_SORT_DATE_RECENTLY_CHANGED_ASCENDING = 21; EVERYTHING_SORT_DATE_RECENTLY_CHANGED_DESCENDING = 22; EVERYTHING_SORT_DATE_ACCESSED_ASCENDING = 23; EVERYTHING_SORT_DATE_ACCESSED_DESCENDING = 24; EVERYTHING_SORT_DATE_RUN_ASCENDING = 25; EVERYTHING_SORT_DATE_RUN_DESCENDING = 26; EVERYTHING_REQUEST_FILE_NAME = $00000001; EVERYTHING_REQUEST_PATH = $00000002; EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME = $00000004; EVERYTHING_REQUEST_EXTENSION = $00000008; EVERYTHING_REQUEST_SIZE = $00000010; EVERYTHING_REQUEST_DATE_CREATED = $00000020; EVERYTHING_REQUEST_DATE_MODIFIED = $00000040; EVERYTHING_REQUEST_DATE_ACCESSED = $00000080; EVERYTHING_REQUEST_ATTRIBUTES = $00000100; EVERYTHING_REQUEST_FILE_LIST_FILE_NAME = $00000200; EVERYTHING_REQUEST_RUN_COUNT = $00000400; EVERYTHING_REQUEST_DATE_RUN = $00000800; EVERYTHING_REQUEST_DATE_RECENTLY_CHANGED = $00001000; EVERYTHING_REQUEST_HIGHLIGHTED_FILE_NAME = $00002000; EVERYTHING_REQUEST_HIGHLIGHTED_PATH = $00004000; EVERYTHING_REQUEST_HIGHLIGHTED_FULL_PATH_AND_FILE_NAME = $00008000; EVERYTHING_TARGET_MACHINE_X86 = 1; EVERYTHING_TARGET_MACHINE_X64 = 2; EVERYTHING_TARGET_MACHINE_ARM = 3; {/// write search state } procedure Everything_SetSearchW(lpString: PWIDECHAR) stdcall; procedure Everything_SetSearchA(lpString: PANSICHAR) stdcall; procedure Everything_SetMatchPath(bEnable: Bool) stdcall; procedure Everything_SetMatchCase(bEnable: Bool) stdcall; procedure Everything_SetMatchWholeWord(bEnable: Bool) stdcall; procedure Everything_SetRegex(bEnable: Bool) stdcall; procedure Everything_SetMax(dwMax: LongInt) stdcall; procedure Everything_SetOffset(dwOffset: LongInt) stdcall; procedure Everything_SetReplyWindow(hWnd: HWND) stdcall; procedure Everything_SetReplyID(dwId: LongInt) stdcall; procedure Everything_SetSort(dwSort: LongInt) stdcall; procedure Everything_SetRequestFlags(dwRequestFlags: LongInt) stdcall; {/// read search state } function Everything_GetMatchPath: BOOL stdcall; function Everything_GetMatchCase: BOOL stdcall; function Everything_GetMatchWholeWord: BOOL stdcall; function Everything_GetRegex: BOOL stdcall; function Everything_GetMax: DWORD stdcall; function Everything_GetOffset: DWORD stdcall; function Everything_GetSearchA: PANSICHAR stdcall; function Everything_GetSearchW: PWIDECHAR stdcall; function Everything_GetLastError: DWORD stdcall; function Everything_GetReplyWindow: HWND stdcall; function Everything_GetReplyID: DWORD stdcall; function Everything_GetSort: DWORD stdcall; function Everything_GetRequestFlags: DWORD stdcall; {/// execute query } function Everything_QueryA(bWait: Bool): BOOL stdcall; function Everything_QueryW(bWait: Bool): BOOL stdcall; {/// query reply } function Everything_IsQueryReply(message: Word; wParam: wParam; lParam: lParam; dwId: LongInt): BOOL stdcall; {/// write result state } procedure Everything_SortResultsByPath;// stdcall; {/// read result state } function Everything_GetNumFileResults: DWORD stdcall; function Everything_GetNumFolderResults: DWORD stdcall; function Everything_GetNumResults: DWORD stdcall; function Everything_GetTotFileResults: DWORD stdcall; function Everything_GetTotFolderResults: DWORD stdcall; function Everything_GetTotResults: DWORD stdcall; function Everything_IsVolumeResult(dwIndex: LongInt): BOOL stdcall; function Everything_IsFolderResult(dwIndex: LongInt): BOOL stdcall; function Everything_IsFileResult(dwIndex: LongInt): BOOL stdcall; function Everything_GetResultFileNameW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultFileNameA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultPathW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultPathA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultFullPathNameA(dwIndex: LongInt; buf: PChar; bufsize: LongInt): DWORD stdcall; function Everything_GetResultFullPathNameW(dwIndex: LongInt; wbuf: WideChar; wbuf_size_in_wchars: LongInt): DWORD stdcall; function Everything_GetResultListSort: DWORD stdcall; function Everything_GetResultListRequestFlags: DWORD stdcall; function Everything_GetResultExtensionW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultExtensionA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultSize(dwIndex: LongInt; lpSize: PINT): BOOL stdcall; function Everything_GetResultDateCreated(dwIndex: LongInt; lpDateCreated: PFileTime): BOOL stdcall; function Everything_GetResultDateModified(dwIndex: LongInt; lpDateModified: PFileTime): BOOL stdcall; function Everything_GetResultDateAccessed(dwIndex: LongInt; lpDateAccessed: PFileTime): BOOL stdcall; function Everything_GetResultAttributes(dwIndex: LongInt): DWORD stdcall; function Everything_GetResultFileListFileNameW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultFileListFileNameA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultRunCount(dwIndex: LongInt): DWORD stdcall; function Everything_GetResultDateRun(dwIndex: LongInt; lpDateRun: PFileTime): BOOL stdcall; function Everything_GetResultDateRecentlyChanged(dwIndex: LongInt; lpDateRecentlyChanged: PFileTime): BOOL stdcall; function Everything_GetResultHighlightedFileNameW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultHighlightedFileNameA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultHighlightedPathW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultHighlightedPathA(dwIndex: LongInt): PANSICHAR stdcall; function Everything_GetResultHighlightedFullPathAndFileNameW(dwIndex: LongInt): PWIDECHAR stdcall; function Everything_GetResultHighlightedFullPathAndFileNameA(dwIndex: LongInt): PANSICHAR stdcall; {/// reset state and free any allocated memory } procedure Everything_Reset;// stdcall; procedure Everything_CleanUp;// stdcall; function Everything_GetMajorVersion: DWORD stdcall; function Everything_GetMinorVersion: DWORD stdcall; function Everything_GetRevision: DWORD stdcall; function Everything_GetBuildNumber: DWORD stdcall; function Everything_Exit: BOOL stdcall; function Everything_IsDBLoaded: BOOL stdcall; function Everything_IsAdmin: BOOL stdcall; function Everything_IsAppData: BOOL stdcall; function Everything_RebuildDB: BOOL stdcall; function Everything_UpdateAllFolderIndexes: BOOL stdcall; function Everything_SaveDB: BOOL stdcall; function Everything_SaveRunHistory: BOOL stdcall; function Everything_DeleteRunHistory: BOOL stdcall; function Everything_GetTargetMachine: DWORD stdcall; function Everything_GetRunCountFromFileNameW(var lpFileName: PWIDECHAR): DWORD stdcall; function Everything_GetRunCountFromFileNameA(var lpFileName: PANSICHAR): DWORD stdcall; function Everything_SetRunCountFromFileNameW(var lpFileName: PWIDECHAR; dwRunCount: LongInt): BOOL stdcall; function Everything_SetRunCountFromFileNameA(var lpFileName: PANSICHAR; dwRunCount: LongInt): BOOL stdcall; function Everything_IncRunCountFromFileNameW(var lpFileName: PWIDECHAR): DWORD stdcall; function Everything_IncRunCountFromFileNameA(var lpFileName: PANSICHAR): DWORD stdcall; //{$IFDEF UNICODE} // //const // Everything_SetSearch = Everything_SetSearchW; // Everything_GetSearch = Everything_GetSearchW; // Everything_Query = Everything_QueryW; // Everything_Query2 = Everything_Query2W; // Everything_GetResultFileName = Everything_GetResultFileNameW; // Everything_GetResultPath = Everything_GetResultPathW; // Everything_GetResultFullPathName = Everything_GetResultFullPathNameW; // Everything_GetResultExtension = Everything_GetResultExtensionW; // Everything_GetResultFileListFileName = Everything_GetResultFileListFileNameW; // Everything_GetResultHighlightedFileName = Everything_GetResultHighlightedFileNameW; // Everything_GetResultHighlightedPath = Everything_GetResultHighlightedPathW; // Everything_GetResultHighlightedFullPathAndFileName = Everything_GetResultHighlightedFullPathAndFileNameW; // Everything_GetRunCountFromFileName = Everything_GetRunCountFromFileNameW; // Everything_SetRunCountFromFileName = Everything_SetRunCountFromFileNameW; // Everything_IncRunCountFromFileName = Everything_IncRunCountFromFileNameW; //{$ELSE} // //const // Everything_SetSearch = Everything_SetSearchA; // Everything_GetSearch = Everything_GetSearchA; // Everything_Query = Everything_QueryA; // Everything_Query2 = Everything_Query2A; // Everything_GetResultFileName = Everything_GetResultFileNameA; // Everything_GetResultPath = Everything_GetResultPathA; // Everything_GetResultFullPathName = Everything_GetResultFullPathNameA; // Everything_GetResultExtension = Everything_GetResultExtensionA; // Everything_GetResultFileListFileName = Everything_GetResultFileListFileNameA; // Everything_GetResultHighlightedFileName = Everything_GetResultHighlightedFileNameA; // Everything_GetResultHighlightedPath = Everything_GetResultHighlightedPathA; // Everything_GetResultHighlightedFullPathAndFileName = Everything_GetResultHighlightedFullPathAndFileNameA; // Everything_GetRunCountFromFileName = Everything_GetRunCountFromFileNameA; // Everything_SetRunCountFromFileName = Everything_SetRunCountFromFileNameA; // Everything_IncRunCountFromFileName = Everything_IncRunCountFromFileNameA; //{$ENDIF} implementation procedure Everything_SetSearchW; external 'EVERYTHING.DLL'; procedure Everything_SetSearchA; external 'EVERYTHING.DLL'; procedure Everything_SetMatchPath; external 'EVERYTHING.DLL'; procedure Everything_SetMatchCase; external 'EVERYTHING.DLL'; procedure Everything_SetMatchWholeWord; external 'EVERYTHING.DLL'; procedure Everything_SetRegex; external 'EVERYTHING.DLL'; procedure Everything_SetMax; external 'EVERYTHING.DLL'; procedure Everything_SetOffset; external 'EVERYTHING.DLL'; procedure Everything_SetReplyWindow; external 'EVERYTHING.DLL'; procedure Everything_SetReplyID; external 'EVERYTHING.DLL'; procedure Everything_SetSort; external 'EVERYTHING.DLL'; procedure Everything_SetRequestFlags; external 'EVERYTHING.DLL'; function Everything_GetMatchPath; external 'EVERYTHING.DLL'; function Everything_GetMatchCase; external 'EVERYTHING.DLL'; function Everything_GetMatchWholeWord; external 'EVERYTHING.DLL'; function Everything_GetRegex; external 'EVERYTHING.DLL'; function Everything_GetMax; external 'EVERYTHING.DLL'; function Everything_GetOffset; external 'EVERYTHING.DLL'; function Everything_GetSearchA; external 'EVERYTHING.DLL'; function Everything_GetSearchW; external 'EVERYTHING.DLL'; function Everything_GetLastError; external 'EVERYTHING.DLL'; function Everything_GetReplyWindow; external 'EVERYTHING.DLL'; function Everything_GetReplyID; external 'EVERYTHING.DLL'; function Everything_GetSort; external 'EVERYTHING.DLL'; function Everything_GetRequestFlags; external 'EVERYTHING.DLL'; function Everything_QueryA; external 'EVERYTHING.DLL'; function Everything_QueryW; external 'EVERYTHING.DLL'; function Everything_IsQueryReply; external 'EVERYTHING.DLL'; procedure Everything_SortResultsByPath; external 'EVERYTHING.DLL'; function Everything_GetNumFileResults; external 'EVERYTHING.DLL'; function Everything_GetNumFolderResults; external 'EVERYTHING.DLL'; function Everything_GetNumResults; external 'EVERYTHING.DLL'; function Everything_GetTotFileResults; external 'EVERYTHING.DLL'; function Everything_GetTotFolderResults; external 'EVERYTHING.DLL'; function Everything_GetTotResults; external 'EVERYTHING.DLL'; function Everything_IsVolumeResult; external 'EVERYTHING.DLL'; function Everything_IsFolderResult; external 'EVERYTHING.DLL'; function Everything_IsFileResult; external 'EVERYTHING.DLL'; function Everything_GetResultFileNameW; external 'EVERYTHING.DLL'; function Everything_GetResultFileNameA; external 'EVERYTHING.DLL'; function Everything_GetResultPathW; external 'EVERYTHING.DLL'; function Everything_GetResultPathA; external 'EVERYTHING.DLL'; function Everything_GetResultFullPathNameA; external 'EVERYTHING.DLL'; function Everything_GetResultFullPathNameW; external 'EVERYTHING.DLL'; function Everything_GetResultListSort; external 'EVERYTHING.DLL'; function Everything_GetResultListRequestFlags; external 'EVERYTHING.DLL'; function Everything_GetResultExtensionW; external 'EVERYTHING.DLL'; function Everything_GetResultExtensionA; external 'EVERYTHING.DLL'; function Everything_GetResultSize; external 'EVERYTHING.DLL'; function Everything_GetResultDateCreated; external 'EVERYTHING.DLL'; function Everything_GetResultDateModified; external 'EVERYTHING.DLL'; function Everything_GetResultDateAccessed; external 'EVERYTHING.DLL'; function Everything_GetResultAttributes; external 'EVERYTHING.DLL'; function Everything_GetResultFileListFileNameW; external 'EVERYTHING.DLL'; function Everything_GetResultFileListFileNameA; external 'EVERYTHING.DLL'; function Everything_GetResultRunCount; external 'EVERYTHING.DLL'; function Everything_GetResultDateRun; external 'EVERYTHING.DLL'; function Everything_GetResultDateRecentlyChanged; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedFileNameW; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedFileNameA; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedPathW; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedPathA; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedFullPathAndFileNameW; external 'EVERYTHING.DLL'; function Everything_GetResultHighlightedFullPathAndFileNameA; external 'EVERYTHING.DLL'; procedure Everything_Reset; external 'EVERYTHING.DLL'; procedure Everything_CleanUp; external 'EVERYTHING.DLL'; function Everything_GetMajorVersion; external 'EVERYTHING.DLL'; function Everything_GetMinorVersion; external 'EVERYTHING.DLL'; function Everything_GetRevision; external 'EVERYTHING.DLL'; function Everything_GetBuildNumber; external 'EVERYTHING.DLL'; function Everything_Exit; external 'EVERYTHING.DLL'; function Everything_IsDBLoaded; external 'EVERYTHING.DLL'; function Everything_IsAdmin; external 'EVERYTHING.DLL'; function Everything_IsAppData; external 'EVERYTHING.DLL'; function Everything_RebuildDB; external 'EVERYTHING.DLL'; function Everything_UpdateAllFolderIndexes; external 'EVERYTHING.DLL'; function Everything_SaveDB; external 'EVERYTHING.DLL'; function Everything_SaveRunHistory; external 'EVERYTHING.DLL'; function Everything_DeleteRunHistory; external 'EVERYTHING.DLL'; function Everything_GetTargetMachine; external 'EVERYTHING.DLL'; function Everything_GetRunCountFromFileNameW; external 'EVERYTHING.DLL'; function Everything_GetRunCountFromFileNameA; external 'EVERYTHING.DLL'; function Everything_SetRunCountFromFileNameW; external 'EVERYTHING.DLL'; function Everything_SetRunCountFromFileNameA; external 'EVERYTHING.DLL'; function Everything_IncRunCountFromFileNameW; external 'EVERYTHING.DLL'; function Everything_IncRunCountFromFileNameA; external 'EVERYTHING.DLL'; end.
虽然有类似Everything的算法实现,但是Everything功能更多,而且有维护。
类似Everything的算法:
https://blog.csdn.net/dbyoung/article/details/80050792
标签:EverythingSDK,function,pas,EVERYTHING,DLL,Everything,external,stdcall From: https://www.cnblogs.com/unjiang/p/16819146.html