Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Everything Search Engine SDK for Delphi

License

NotificationsYou must be signed in to change notification settings

delphilite/EverythingSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VersionLicenseLangstars

EverythingSDK is aDelphi client library forVoidtools' Everything search engine. It supports both dynamic and static libraries from the native Everything SDK.

Everything is a powerful search engine that can index and search for files, folders, and other data on your Windows system. The official C++ SDK provides a way to access the Everything database and perform searches programmatically. This repository provides a Delphi translation of the C++ SDK, allowing Delphi developers to easily integrate Everything search functionality into their applications.

Everything service must be running on your machine.

Features

  • Complete translation of Everything's C++ SDK to Delphi.
  • Easy integration with Delphi projects.
  • Supports all major features of the original SDK.
  • Supports using static libraries (Everything32.obj/Everything64.obj). By enabling the ET_STATICLINK directive (default).
  • Supports using dynamic libraries (Everything32.dll/Everything64.dll).
  • Supports using the Everything IPC (EverythingIPC.pas+EverythingImpl.pas). Reference EverythingImpl instead of EverythingSDK, without requiring any DLL or OBJ.

Requirements

  • Delphi XE2 or later.
  • Everything 1.4.1 or later.

Installation: Manual

To install the EverythingSDK binding, follow these steps:

  1. Clone the repository:

    git clone https://github.com/delphilite/EverythingSDK.git
  2. Add the EverythingSDK\Source directory to the project or IDE's search path.

  3. Make sure Everything is installed and running on your system.

Installation: Delphinus-Support

EverythingSDK should now be listed inDelphinus package manager.

Be sure to restart Delphi after installing via Delphinus otherwise the units may not be found in your test projects.

Usage

Here's a simple example demonstrating how to use the EverythingSDK in a Delphi application:

uses  SysUtils, Windows, EverythingSDK;{ or EverythingImpl instead of EverythingSDK}functionFileTimeToDateTime(const AFileTime: TFileTime): TDateTime;var  LocalFileTime: TFileTime;  SystemTime: TSystemTime;begin  FileTimeToLocalFileTime(AFileTime, LocalFileTime);  FileTimeToSystemTime(LocalFileTime, SystemTime);  Result := SystemTimeToDateTime(SystemTime);end;functionFormatFileAttrib(AAttrib: DWORD): string;beginif AAttriband faDirectory <>0then    Result :=''elsebegin    Result :='';if AAttriband faReadOnly <>0then      Result := Result +'r'else Result := Result +'-';if AAttriband faArchive <>0then      Result := Result +'a'else Result := Result +'-';if AAttriband faHidden <>0then      Result := Result +'h'else Result := Result +'-';if AAttriband faSysFile <>0then      Result := Result +'s'else Result := Result +'-';end;end;procedureExecute(const AFind: string);var  C, F, I, R: DWORD;  dwAttributes: DWORD;  fileName: string;  fileAttrib, fileSize, fileTime: string;  ftModified: TFileTime;  nSize: Int64;begin  Writeln('Find:', AFind);  Everything_SetSearch(PChar(AFind));  F := EVERYTHING_REQUEST_FILE_NAMEor EVERYTHING_REQUEST_PATHor EVERYTHING_REQUEST_DATE_MODIFIEDor    EVERYTHING_REQUEST_SIZEor EVERYTHING_REQUEST_ATTRIBUTES;  Everything_SetRequestFlags(F);  Everything_SetSort(EVERYTHING_SORT_PATH_ASCENDING);  Writeln('Execute Query');ifnot Everything_Query(True)thenbegin    R := Everything_GetLastError;    raise Exception.Create(Everything_GetErrorMessage(R));end;  Writeln('Result List Request Flags:', Everything_GetResultListRequestFlags());  C := Everything_GetNumResults();  Writeln('Result List Count:', C);if C >0thenfor I :=0to C -1dobegin    SetLength(fileName, MAX_PATH);    R := Everything_GetResultFullPathName(I, PChar(fileName), MAX_PATH);    SetLength(fileName, R);    dwAttributes := Everything_GetResultAttributes(I);    fileAttrib := FormatFileAttrib(dwAttributes);    fileAttrib := Format('%6s', [fileAttrib]);    Everything_GetResultSize(I, nSize);if dwAttributesand faDirectory <>0then      fileSize :='-1'else fileSize := FormatFloat('#,#.#',nSize);    fileSize := Format('%16s', [fileSize]);if Everything_GetResultDateModified(I, ftModified)then      fileTime := FormatDateTime('yyyy/mm/dd hh:nn:ss', FileTimeToDateTime(ftModified))else fileTime := StringOfChar('',19);    Writeln(fileTime,'', fileAttrib,'', fileSize,'', fileName);end;end;begin  ReportMemoryLeaksOnShutdown := True;try    WriteLn('Everything:', Everything_GetVersion);    WriteLn('');    Execute('*.iso');    WriteLn('');    WriteLn('Done.');except    on E: Exceptiondo      WriteLn('Error:', E.Message);end;  ReadLn;  Everything_CleanUp;end.

For more examples based on low-level API, refer to the test cases under the demos directory.

Documentation

For more detailed information, refer to theEverything SDK.

Contributing

Contributions are welcome! Please fork this repository and submit pull requests with your improvements.

License

This project is licensed under the Mozilla Public License 2.0. See theLICENSE file for details.

Acknowledgements

Special thanks to Voidtools for creating Everything and providing the original SDK.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp