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 / C++ / MFC
  4. how to get all handles of process

how to get all handles of process

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
6 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.
  • S Offline
    S Offline
    so0_lanhlung2
    wrote on last edited by
    #1

    In Process Explorer software have function view handles of process i don't know how to get handles same that function someone give me idea>? thanks so much sorry if my english is not good

    C N 2 Replies Last reply
    0
    • S so0_lanhlung2

      In Process Explorer software have function view handles of process i don't know how to get handles same that function someone give me idea>? thanks so much sorry if my english is not good

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Maybe check this[^] as a starting point, it has source code for you to examine.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<

      S 1 Reply Last reply
      0
      • S so0_lanhlung2

        In Process Explorer software have function view handles of process i don't know how to get handles same that function someone give me idea>? thanks so much sorry if my english is not good

        N Offline
        N Offline
        Nuri Ismail
        wrote on last edited by
        #3

        If you want to retrieve the number of opened handles by given process you can use GetProcessHandleCount[^]. Note that minimum supported clients for this function are Windows Vista and Windows XP with SP1. If you want to support older windows versions you can use NtQuerySystemInformation[^]. Look for SYSTEM_PROCESS_INFORMATION class and read the documentation carefully before using this function. I hope this helps.

        S 1 Reply Last reply
        0
        • N Nuri Ismail

          If you want to retrieve the number of opened handles by given process you can use GetProcessHandleCount[^]. Note that minimum supported clients for this function are Windows Vista and Windows XP with SP1. If you want to support older windows versions you can use NtQuerySystemInformation[^]. Look for SYSTEM_PROCESS_INFORMATION class and read the documentation carefully before using this function. I hope this helps.

          S Offline
          S Offline
          so0_lanhlung2
          wrote on last edited by
          #4

          thanks. i 'll research...do you have a help document for me?

          N 1 Reply Last reply
          0
          • C Code o mat

            Maybe check this[^] as a starting point, it has source code for you to examine.

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<

            S Offline
            S Offline
            so0_lanhlung2
            wrote on last edited by
            #5

            thanks very clearly :).. i'll try

            1 Reply Last reply
            0
            • S so0_lanhlung2

              thanks. i 'll research...do you have a help document for me?

              N Offline
              N Offline
              Nuri Ismail
              wrote on last edited by
              #6

              Well I already gave you the link to the documentations of two APIs. The usage of GetProcessHandleCount is trivial, documentation says everything you need. For NtQuerySystemInformation you can check out this[^] thread, where you will find a sample code that actually retrieves Handle Count, Thread Count, etc. The example code actually uses ZwQuerySystemInformation[^] function but in fact this does not change anything for you, the usage is exactly the same. P.S. If you actually want to know the difference between 'Nt' and "Zw' prefixed native API functions, have a look at this interesting article[^]. :)

              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