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. GetModuleHandle() or GetCurrentProcess()

GetModuleHandle() or GetCurrentProcess()

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 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
    Srini Kella
    wrote on last edited by
    #1

    Are the handles returned from the following funcs going to be same?? GetModuleHandle(NULL) GetCurrentProcess(void)

    P 1 Reply Last reply
    0
    • S Srini Kella

      Are the handles returned from the following funcs going to be same?? GetModuleHandle(NULL) GetCurrentProcess(void)

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      No they do not return the same thing. GetModuleHandler returns a handle to the module that you request, which cooincidnetally is the address at which the Module was loaded into memory. GetCurrentProcess returns a pseudo-handle, which if you use that handle value in any of the functions that expects a process handle, it will be interpreted as the current process.


      Build a man a fire, and he will be warm for a day
      Light a man on fire, and he will be warm for the rest of his life!

      S 1 Reply Last reply
      0
      • P Paul M Watt

        No they do not return the same thing. GetModuleHandler returns a handle to the module that you request, which cooincidnetally is the address at which the Module was loaded into memory. GetCurrentProcess returns a pseudo-handle, which if you use that handle value in any of the functions that expects a process handle, it will be interpreted as the current process.


        Build a man a fire, and he will be warm for a day
        Light a man on fire, and he will be warm for the rest of his life!

        S Offline
        S Offline
        Srini Kella
        wrote on last edited by
        #3

        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