Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C++ (https://www.askmehelpdesk.com/forumdisplay.php?f=439)
-   -   GetDriveType issue. (https://www.askmehelpdesk.com/showthread.php?t=106554)

  • Jul 3, 2007, 08:32 PM
    rag84dec
    GetDriveType issue.
    Hi,
    I want to know from where my executable been executed... For example...
    If I execute it from USB I can use the following thing
    Code:

    if(GetDriveType(Exe_name)== DRIVE_CDROM ||
          GetDriveType(Exe_name)== DRIVE_REMOVABLE)
    print("Not from the local disk");

    If I execute it from a directory "like"
    Go to start->run->type "\\ip_address\exe_name"... If I execute this then how I will get to know from where I am executing?

    The "Winbase.h" has the following things or options
    #define DRIVE_UNKNOWN 0
    #define DRIVE_NO_ROOT_DIR 1
    #define DRIVE_REMOVABLE 2
    #define DRIVE_FIXED 3
    #define DRIVE_REMOTE 4
    #define DRIVE_CDROM 5
    #define DRIVE_RAMDISK 6


    Which one to select??

    Thanks
  • Jul 5, 2007, 02:12 AM
    benn11
    I see that you didn't get any response, this might be that we don't have enough programming background in C++ but you can use this website to search for your answer >>

  • All times are GMT -7. The time now is 04:42 PM.