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. Hfile for files own code

Hfile for files own code

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • M Offline
    M Offline
    Mr_Byte
    wrote on last edited by
    #1

    HI , Ijust was wondering how can I get the handle (hfile) of my application file from its code (i.e to get the hfile of the exe and the code to do so is in the same exe too) thanks in advance

    D A 2 Replies Last reply
    0
    • M Mr_Byte

      HI , Ijust was wondering how can I get the handle (hfile) of my application file from its code (i.e to get the hfile of the exe and the code to do so is in the same exe too) thanks in advance

      D Offline
      D Offline
      Daniel Lohmann
      wrote on last edited by
      #2

      What's about retrieving the module file name and path with GetModuleFileName() and then just open it with CreateFile() ;P -- Daniel Lohmann http://www.losoft.de

      1 Reply Last reply
      0
      • M Mr_Byte

        HI , Ijust was wondering how can I get the handle (hfile) of my application file from its code (i.e to get the hfile of the exe and the code to do so is in the same exe too) thanks in advance

        A Offline
        A Offline
        Ancient Dragon
        wrote on last edited by
        #3

        GetCurrentProcess() does that.

        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