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. ATL / WTL / STL
  4. Get process handle access rights.

Get process handle access rights.

Scheduled Pinned Locked Moved ATL / WTL / STL
question
7 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.
  • G Offline
    G Offline
    Green Fuze
    wrote on last edited by
    #1

    Hey everybody! Is there a way to get access rights out of a process HANDLE ? Thanks! :-)

    C 1 Reply Last reply
    0
    • G Green Fuze

      Hey everybody! Is there a way to get access rights out of a process HANDLE ? Thanks! :-)

      C Offline
      C Offline
      Cool_Dev
      wrote on last edited by
      #2

      CAccessToken ATL Class

      G 1 Reply Last reply
      0
      • C Cool_Dev

        CAccessToken ATL Class

        G Offline
        G Offline
        Green Fuze
        wrote on last edited by
        #3

        Hey, Thanks for your answer, but I can't see how it returns the Access rights of the process HANDLE (not the token's access rights).

        _ 1 Reply Last reply
        0
        • G Green Fuze

          Hey, Thanks for your answer, but I can't see how it returns the Access rights of the process HANDLE (not the token's access rights).

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          CAccessToken::GetProcessToken will get the token belonging to the process handle. You can do the same using the OpenProcessToken API.

          «_Superman_»
          I love work. It gives me something to do between weekends.

          Microsoft MVP (Visual C++)

          Polymorphism in C

          G 1 Reply Last reply
          0
          • _ _Superman_

            CAccessToken::GetProcessToken will get the token belonging to the process handle. You can do the same using the OpenProcessToken API.

            «_Superman_»
            I love work. It gives me something to do between weekends.

            Microsoft MVP (Visual C++)

            Polymorphism in C

            G Offline
            G Offline
            Green Fuze
            wrote on last edited by
            #5

            Hey, I know about Access tokens, but it is not what I want. I want to know if the given HANDLE of process has a certain access rights. For instance, SYNCHRONIZE or PROCESS_TERMINATE. Is it possible to do so with Access Token?

            C 1 Reply Last reply
            0
            • G Green Fuze

              Hey, I know about Access tokens, but it is not what I want. I want to know if the given HANDLE of process has a certain access rights. For instance, SYNCHRONIZE or PROCESS_TERMINATE. Is it possible to do so with Access Token?

              C Offline
              C Offline
              Cool_Dev
              wrote on last edited by
              #6

              you may open another handle to that process using process id. Specify desired access right such as SYNCHRONIZE or PROCESS_TERMINATE in OpenProcess(). Check the return value to test whether desired right on process is granted or not :)
              i don't know whether there is any undocumented API for enumerating process access rights :( :(

              G 1 Reply Last reply
              0
              • C Cool_Dev

                you may open another handle to that process using process id. Specify desired access right such as SYNCHRONIZE or PROCESS_TERMINATE in OpenProcess(). Check the return value to test whether desired right on process is granted or not :)
                i don't know whether there is any undocumented API for enumerating process access rights :( :(

                G Offline
                G Offline
                Green Fuze
                wrote on last edited by
                #7

                Yeah, that's what I thought as well... :-( So I guess I'll have to check the kernel mode function, and check if it is also implemented in ntdll.dll (like other functions I found). Thanks a lot anyway! :-)

                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