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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help!

Help!

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
5 Posts 4 Posters 1 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.
  • J Offline
    J Offline
    josip cagalj
    wrote on last edited by
    #1

    Please, how can I get a folder where a current program/app is running from? Thanks!

    K H N 3 Replies Last reply
    0
    • J josip cagalj

      Please, how can I get a folder where a current program/app is running from? Thanks!

      K Offline
      K Offline
      karle
      wrote on last edited by
      #2

      TCHAR lszModuleFileName[MAX_PATH] = { '\0' }; GetModuleFileName( AfxGetInstanceHandle( ), lszModuleFileName, _countof(lszModuleFileName) ); lszModuleFileName contains now the complete filename incl. path of your executable !

      J 1 Reply Last reply
      0
      • J josip cagalj

        Please, how can I get a folder where a current program/app is running from? Thanks!

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

        Is that your program or you run a foreign program?


        WhiteSky


        1 Reply Last reply
        0
        • K karle

          TCHAR lszModuleFileName[MAX_PATH] = { '\0' }; GetModuleFileName( AfxGetInstanceHandle( ), lszModuleFileName, _countof(lszModuleFileName) ); lszModuleFileName contains now the complete filename incl. path of your executable !

          J Offline
          J Offline
          josip cagalj
          wrote on last edited by
          #4

          Thx!

          1 Reply Last reply
          0
          • J josip cagalj

            Please, how can I get a folder where a current program/app is running from? Thanks!

            N Offline
            N Offline
            Naveen
            wrote on last edited by
            #5

            GetCurrentDirectory() ..?

            nave [OpenedFileFinder]

            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