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. About the drive the program has been loaded from

About the drive the program has been loaded from

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
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.
  • V Offline
    V Offline
    Vancouver
    wrote on last edited by
    #1

    1. How can one find out, from which drive the actual program has been loaded from? 2. How can one find out, what kind of drive that is (floppy disk, RAMdisk, fixed volume, CDROM, etc.)? I found something re Stylebit of Removable Volume, but I did not find how to get it in C++. Thanks

    J 1 Reply Last reply
    0
    • V Vancouver

      1. How can one find out, from which drive the actual program has been loaded from? 2. How can one find out, what kind of drive that is (floppy disk, RAMdisk, fixed volume, CDROM, etc.)? I found something re Stylebit of Removable Volume, but I did not find how to get it in C++. Thanks

      J Offline
      J Offline
      Jack Puppy
      wrote on last edited by
      #2

      1. Use GetModuleFileName to get the full path to the program, then use something like splitpath to grab the drive letter. 2. Use GetDriveType In Italy for thirty years under the Borgias they had warfare, terror, murder, bloodshed - but they produced Michelangelo, Leonardo da Vinci and the Renaissance. In Switzerland they had brotherly love, five hundred years of democracy and what did that produce - the cuckoo clock! -- Harry Lime

      V 1 Reply Last reply
      0
      • J Jack Puppy

        1. Use GetModuleFileName to get the full path to the program, then use something like splitpath to grab the drive letter. 2. Use GetDriveType In Italy for thirty years under the Borgias they had warfare, terror, murder, bloodshed - but they produced Michelangelo, Leonardo da Vinci and the Renaissance. In Switzerland they had brotherly love, five hundred years of democracy and what did that produce - the cuckoo clock! -- Harry Lime

        V Offline
        V Offline
        Vancouver
        wrote on last edited by
        #3

        Thankx; I was looking for just these functionalities (without knowing their names :-)

        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