Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. What API to use?

What API to use?

Scheduled Pinned Locked Moved C#
csharpjsonhelpquestion
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    c2423
    wrote on last edited by
    #1

    Hi all, I'm trying to write a C# app to emulate the search functions in Windows Explorer, including "find in files" (otherwise I wouldn't need the help!) I figure there must be part of the Win32 API that performs the find in files function for a set of files, but don't know the name. Can anybody give me any pointers? Thanks, Chris

    L 1 Reply Last reply
    0
    • C c2423

      Hi all, I'm trying to write a C# app to emulate the search functions in Windows Explorer, including "find in files" (otherwise I wouldn't need the help!) I figure there must be part of the Win32 API that performs the find in files function for a set of files, but don't know the name. Can anybody give me any pointers? Thanks, Chris

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      c2423 wrote:

      I figure there must be part of the Win32 API that performs the find in files function for a set of files

      Not that I know of.

      c2423 wrote:

      Can anybody give me any pointers?

      Indexed or non-indexed files? If it's indexed, you might want to interface with Windows Search[^]. Otherwise, it'd still be creating a list of files, and searching them the old-fashioned way.

      I are Troll :suss:

      C 1 Reply Last reply
      0
      • L Lost User

        c2423 wrote:

        I figure there must be part of the Win32 API that performs the find in files function for a set of files

        Not that I know of.

        c2423 wrote:

        Can anybody give me any pointers?

        Indexed or non-indexed files? If it's indexed, you might want to interface with Windows Search[^]. Otherwise, it'd still be creating a list of files, and searching them the old-fashioned way.

        I are Troll :suss:

        C Offline
        C Offline
        c2423
        wrote on last edited by
        #3

        Thanks for the response. Unfortunately I've no control of whether files are indexed or not. I'll have a look at Windows Search though - maybe that will help a bit... Not to sound completely stupid, but what do you have in mind when you say the old-fashioned way? I'm happy searching text files but not Word, Excel etc?

        L 1 Reply Last reply
        0
        • C c2423

          Thanks for the response. Unfortunately I've no control of whether files are indexed or not. I'll have a look at Windows Search though - maybe that will help a bit... Not to sound completely stupid, but what do you have in mind when you say the old-fashioned way? I'm happy searching text files but not Word, Excel etc?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          c2423 wrote:

          I'm happy searching text files but not Word, Excel etc?

          That's why both Windows Search and Google Desktop employ plugins to index a specific filetype. To quote;

          MSDN states:

          Windows Search currently supports the indexing of over 200 types of items (such as .txt, .html, and .xml file formats) and can work with multiple types of data stores (such as the NTFS file system and Microsoft Outlook).

          Searching an index is also functionally different from searching a file; the index isn't updated continuously.

          I are Troll :suss:

          C 1 Reply Last reply
          0
          • L Lost User

            c2423 wrote:

            I'm happy searching text files but not Word, Excel etc?

            That's why both Windows Search and Google Desktop employ plugins to index a specific filetype. To quote;

            MSDN states:

            Windows Search currently supports the indexing of over 200 types of items (such as .txt, .html, and .xml file formats) and can work with multiple types of data stores (such as the NTFS file system and Microsoft Outlook).

            Searching an index is also functionally different from searching a file; the index isn't updated continuously.

            I are Troll :suss:

            C Offline
            C Offline
            c2423
            wrote on last edited by
            #5

            Interesting information. Looks like I might have to think of another approach to it by using plugins. Thanks for the help!

            L P 2 Replies Last reply
            0
            • C c2423

              Interesting information. Looks like I might have to think of another approach to it by using plugins. Thanks for the help!

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              You're welcome :)

              1 Reply Last reply
              0
              • C c2423

                Interesting information. Looks like I might have to think of another approach to it by using plugins. Thanks for the help!

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                If you just want to search through files, you might want to consider using the IFilter interface which allows you to read things like PDF files, Word docs and the likes. More details are here[^].

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                C 1 Reply Last reply
                0
                • P Pete OHanlon

                  If you just want to search through files, you might want to consider using the IFilter interface which allows you to read things like PDF files, Word docs and the likes. More details are here[^].

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  C Offline
                  C Offline
                  c2423
                  wrote on last edited by
                  #8

                  Nice! Thanks.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups