Thread: hard disk information

  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39

    Cool hard disk information

    Hi all,
    i want to write a program in C++ to retrieve hard disk information like volume labels etc.Can anyone help me
    Last edited by rehan; 08-28-2008 at 08:43 PM.

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Sure, if you're using Windows, you can find the functions you need by searching on http://msdn.microsoft.com/
    If you're using Linux, you can search the man pages: http://man.he.net/

  3. #3
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39
    a function such as?????????

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Without knowing what OS you're using, it's impossible to answer.

  5. #5
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39
    For windows only

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Then ask your OS specific questions in the Windows programming forum.

    Moved to Windows programming.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    I hate real numbers.

  8. #8
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39
    Excuse me!!!! i am asking about a C++ function to use it in my program of Borland C++ , while i am using windows as my operating system.Hopefully its clear.......
    Last edited by rehan; 08-29-2008 at 11:40 AM.

  9. #9
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by rehan View Post
    Excuse me!!!! i am asking about a C++ function to use it in my program of Borland C++ , while i am using windows as my operating system.Hopefully its clear.......
    And if you had read foxman's link, you would see that it provides information about C++ functions using windows as an operating system (well, ok, C functions, but you can call them just the same).

  10. #10
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    Errr. Every functions described on the Win32 section of MSDN are valid C++ functions that you can call from your (C++) application. You only need the correct header and object file to link against. Which you can get via the Windows SDK.
    I hate real numbers.

  11. #11
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39
    in command prompt, command "label" is used to find "volume serial number", what you guys think the function being used is????????

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by rehan View Post
    in command prompt, command "label" is used to find "volume serial number", what you guys think the function being used is????????
    No, we're serious: If you can't go to MSDN and type "volume functions" into the little box on the screen, why should we go to MSDN, type "volume functions" into the little box on the screen, and tell you what it says?

  13. #13
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Struct/parse returning wrong information
    By dontknowc in forum C Programming
    Replies: 5
    Last Post: 12-04-2007, 01:39 PM
  2. Hard Disk Data Corrupted - Please Help
    By Draco in forum Tech Board
    Replies: 16
    Last Post: 12-01-2007, 12:02 AM
  3. Writing Directly to Hard Disk Sectors
    By ali_aslam in forum Linux Programming
    Replies: 2
    Last Post: 07-27-2007, 02:29 AM
  4. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM
  5. Strange hard disk
    By GanglyLamb in forum Tech Board
    Replies: 20
    Last Post: 03-01-2003, 04:05 AM