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. process question

process question

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 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
    gamitech
    wrote on last edited by
    #1

    is there a way to get the handle of aprocess without calling openprocess if i have the pid ? gabby

    T Y 2 Replies Last reply
    0
    • G gamitech

      is there a way to get the handle of aprocess without calling openprocess if i have the pid ? gabby

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      euacela wrote: openprocess if i have the pid ? AFAIK, NO!

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV

      1 Reply Last reply
      0
      • G gamitech

        is there a way to get the handle of aprocess without calling openprocess if i have the pid ? gabby

        Y Offline
        Y Offline
        YoSilver
        wrote on last edited by
        #3

        Definitely, no. Definitely, yes - if you can access information on the Kernel internal structures. But even if so, your app may not work on different Windows versions. One always gets the deserved.
        http://www.silveragesoftware.com/hffr.html
        Update your source code with my tool HandyFile Find And Replace!

        A 1 Reply Last reply
        0
        • Y YoSilver

          Definitely, no. Definitely, yes - if you can access information on the Kernel internal structures. But even if so, your app may not work on different Windows versions. One always gets the deserved.
          http://www.silveragesoftware.com/hffr.html
          Update your source code with my tool HandyFile Find And Replace!

          A Offline
          A Offline
          Alexander M
          wrote on last edited by
          #4

          Even if he had kernel access he couldn't! The kernel does not use handles for the process. It uses pointers to EPROCESS structures! Don't try it, just do it! ;-)

          G 1 Reply Last reply
          0
          • A Alexander M

            Even if he had kernel access he couldn't! The kernel does not use handles for the process. It uses pointers to EPROCESS structures! Don't try it, just do it! ;-)

            G Offline
            G Offline
            gamitech
            wrote on last edited by
            #5

            I know that I can make a driver and use deviceiocontrol and get the handle out but just tell me the function. The EPROCESS structure doesn't have a member for the handle. I know about this function NTSYSAPI NTSTATUS NTAPI PsLookupProcessByProcessId (     IN ULONG        ProcessId,     OUT PEPROCESS       *Process ); and this is all I know about eprocess typedef struct _EPROCESS {     KPROCESS            Pcb;     EX_PUSH_LOCK        ProcessLock;     ...     UCHAR               ImageFileName[16];     ...     UCHAR               PriorityClass;     BOOLEAN             WorkingSetAcquiredUnsafe; } EPROCESS, *PEPROCESS; is KPROCESS the process HANDLE and if it is what ACCESS does it have, i supose PROCESS_ALL_ACCESS right ??/ gabby

            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