Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How Do I Call Windows Search from Delphi Applications?


11 Apr 2009   #1

Windows 7 Ultimate x64
 
 
How Do I Call Windows Search from Delphi Applications?

One of my favourite features of Windows Vista and Windows 7 is the Search Index, so much so, in fact, that I've written a tutorial on how to use it for the Vista Forums. The use of Windows Search has also become one of my most important file management tools, especially the Windows 7 implementation.

Some of the regulars of the Vista and 7 forums will be familiar with a utility I have written: Duplicate Picture Finder. As it stands, duplicates can be located either from a series of specified folders, or from a list of files that are dragged and dropped onto the utility. I'm currently working on some tweaks and modifications, and one of the features I'd like to add is the ability to integrate Windows Search when the program is used on Vista or Windows 7.

Take, for example, the following search query:

Code:
kind:picture AND ((tag:"Wallpapers" AND tag:"Source Images") AND ((width:1920 height:1200) OR (width:1920 height:1440)))
My question is therefore, once any particular Search Query has been created, how will I implement this search from within a Delphi application?

I am using Embarcadero Delphi 2009 for this project. If possible, I would like answers to the following:

1) What Windows API calls will I need to make to execute the search?
2) Will it be possible to have results returned within a TStringList object, or in a manner that makes it easy to convert to TStringList?
3) Furthermore, is anyone familiar with the Windows API that I can use to access and/or modify the metatags embedded within JPG files by Windows Explorer?

As mentioned earlier, I'm using Delphi for this project, so I'll need Object Pascal translations of whatever necessary API call need to be made in order to implement this functionality into Duplicate Picture Finder.

As for the Metatags problem, I've tried using the "Chilkat XMP" controls, except the only problem is those controls are ActiveX, and require installation in order to work. I'd really not do that, because it will destroy the portability of DPF. It can currently be run from network shares, CD/DVD discs or even Flash Memory Drives without requiring an "Install Phase", and runs.

My System SpecsSystem Spec
.

Reply

 How Do I Call Windows Search from Delphi Applications?




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:11 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33