Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 901915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:38:09+00:00 2026-05-15T15:38:09+00:00

The following web page describes querying Windows Search programmatically: http://msdn.microsoft.com/en-us/library/aa965362.aspx Does anyone have examples

  • 0

The following web page describes querying Windows Search programmatically:

http://msdn.microsoft.com/en-us/library/aa965362.aspx

Does anyone have examples using Delphi/Pascal?

Examples I have in mind are fairly simple:

  1. Search for certain file types.
  2. Search for specific text within files.
  3. Limit these above searches to a certain path.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:38:11+00:00Added an answer on May 15, 2026 at 3:38 pm

    Here’s one I did a while ago – be aware that it may be out of date:

    const
      GENERAL_COLUMNS = '"System.Itemname", "System.Size", "System.DateCreated", "System.ItemDate",' +
                        '"System.ItemFolderPathDisplay", "System.Search.AutoSummary", "System.ItemType"';
    
      IMAGE_COLUMNS = '"System.Image.HorizontalSize", "System.Image.VerticalSize", '+
                      '"System.Image.BitDepth", "System.Image.Compression", '+
                      '"System.Photo.CameraModel", "System.Photo.DateTaken", "System.Photo.Flash"';
      MUSIC_COLUMNS = '"System.Music.Artist", "System.Music.Genre", "System.Music.TrackNumber", '+
                      '"System.Audio.Compression", "System.Audio.SampleRate", '+
                      '"System.DRM.IsProtected", "System.Music.AlbumTitle", "System.Rating", '+
                      '"System.Audio.EncodingBitrate"';
    
    procedure TWDSDataSource.RetrieveDataFromDB;
    var
      manager : ISearchManager;
      catalogManager : ISearchCatalogManager;
      queryHelper : ISearchQueryHelper;
      wQuery : string;
      temp : PWideChar;
      sTemp : string;
    begin
      manager := CoCSearchManager.Create;
      if Succeeded(manager.GetCatalog('SystemIndex',catalogManager)) then
      begin
        if Succeeded(catalogManager.GetQueryHelper(queryHelper)) then
        begin
          if fMaxResults  0 then
            queryHelper.Set_QueryMaxResults(fMaxResults);
    
          queryHelper.Set_QuerySelectColumns(GENERAL_COLUMNS + ',' + MUSIC_COLUMNS + ',' + IMAGE_COLUMNS);
          queryHelper.GenerateSQLFromUserQuery(PWideChar(fQuery),temp);
          wQuery := temp;
    
          queryHelper.Get_ConnectionString(temp);
          sTemp := temp;
          dataset := CreateComObject(CLASS_Recordset) as _Recordset;
          dataset.CursorLocation := adUseClient;
          dataset.Open(wQuery, stemp, adOpenForwardOnly, adLockReadOnly, adCmdText);
          dataset.Set_ActiveConnection(nil);
          bDatabaseFailed := false;
        end else
          bDatabaseFailed := true;
      end else
        bDatabaseFailed := true;
    end;
    

    I think it’s all pretty self explanatory, fQuery is the query you want to execute.

    Regards
    Keith

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following in the web page but can't get a response from
I've got the following JavaScript on my web page... 64 var description = new
I'm reloading a web page that has the following code: <label for=showimage>Show Image</label> <input
I'm trying to do the following: User goes to web page, uploads XLS file
My web service method returns a Page object which includes the following methods: public
I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However,
I've got the following piece of code in an aspx webpage: Response.Redirect(/Someurl/); I also
I have the following web config file. I am having some difficulty in retrieving
I embedded a default media player into my webpage with the following html <object
I have the following line of code in a link on my webpage: <a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.