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. OpenProcess Fails

OpenProcess Fails

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 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.
  • A Offline
    A Offline
    Abin
    wrote on last edited by
    #1

    What would you do if ::OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID) fails with error code 5 (Access is denied)? Where dwProcessID is a valid process ID. Is there any way to work around this problem?

    H D 2 Replies Last reply
    0
    • A Abin

      What would you do if ::OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID) fails with error code 5 (Access is denied)? Where dwProcessID is a valid process ID. Is there any way to work around this problem?

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      OpenProcess(PROCESS_VM_READ, FALSE, GetCurrentProcessId()); if you want know dwProccessId in the example MSDN you can find one program that you can see dwProccessId from another proccess

      1 Reply Last reply
      0
      • A Abin

        What would you do if ::OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID) fails with error code 5 (Access is denied)? Where dwProcessID is a valid process ID. Is there any way to work around this problem?

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        I would use the OpenProcessToken()/LookupPrivilegeValue()/AdjustTokenPrivileges() trio to gain access.


        "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

        "We will be known forever by the tracks we leave." - Native American Proverb

        A 1 Reply Last reply
        0
        • D David Crow

          I would use the OpenProcessToken()/LookupPrivilegeValue()/AdjustTokenPrivileges() trio to gain access.


          "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

          "We will be known forever by the tracks we leave." - Native American Proverb

          A Offline
          A Offline
          Abin
          wrote on last edited by
          #4

          Could you please explain a bit more?

          D 1 Reply Last reply
          0
          • A Abin

            Could you please explain a bit more?

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            OpenProcessToken() LookupPrivilegeValue() AdjustTokenPrivileges() Google for examples.


            "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

            "We will be known forever by the tracks we leave." - Native American Proverb

            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