Thread: System information.

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    7

    System information.

    I am making a simple application to gather system information. I am pretty new to C++ but I will eventually use this with another project to do diagnostic checks for error reporting and such.

    I have a few features done but I need some help with some of them. I have tried searching all over the place but can't figure out a working way to do these.

    I need a way to get hard drive space and free hd space.
    a way to get ram
    and a way to get the current Windows version being used (I had a way to do it that said I was on NT?)

    If anyone can help me with any of those I would really appreciate it.

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    630

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    7

    Dev-C++

    I'm not using visuall studio I'm using dev-c++ and it says I'm missing files when I try to use that.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    What files does it say that you are missing?

    and a way to get the current Windows version being used (I had a way to do it that said I was on NT?)
    Often, newer versions of a program are reported as older versions so as not to break existing programs. Windows XP is reported as NT to some programs, because that's what it's ultimately derived from (as opposed to 95/98/ME). Opera can report itself as Internet Explorer or Firefox, because some web pages "require" one of those browsers, and refuse to display if the browser is "Opera". Modern CPUs are occasionally still reported as i586s (Pentiums), etc.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    7

    error with include files.

    I figured out what was wrong before.
    but now I'm getting:
    C:/Dev-Cpp/include/stdAfx.h:17:64: afxwin.h: No such file or directory
    C:/Dev-Cpp/include/stdAfx.h:18:46: afxext.h: No such file or directory
    C:/Dev-Cpp/include/stdAfx.h:19:78: afxdtctl.h: No such file or directory
    C:/Dev-Cpp/include/stdAfx.h:21:65: afxcmn.h: No such file or directory
    when I try to compile this now.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    That looks like it's an application intended to use MFC, whcih I don't think is part of dev-c++.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    No, it isn't.

    You could download the free Express edition of MSVC. Or you could search around the internet for some other code.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  8. #8
    Registered User
    Join Date
    Sep 2007
    Posts
    7
    Ok I think I found the right files but I'm also getting a bunch of
    error: `CString' does not name a type
    errors

  9. #9
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by X3no View Post
    Ok I think I found the right files but I'm also getting a bunch of
    errors
    If you "found the right files", then you should have a CString template declaration somewhere in them. I suspect you didn't get ALL the files you need.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  10. #10
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    CString is an MFC type.

    You may have found and downloaded afxwin.h, etc, but that doesn't mean that your compiler can now compile MFC programs. You still need some libraries, etc. I'd download MSVC Express if you really want to compile that code. Or better yet look elsewhere.

    Or maybe you can get someone on this board to compile it for you, someone with MSVC. I can't help you there.

    That's assuming that you just want to run it, not use it in your own code.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #11
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    http://msdn2.microsoft.com/en-us/library/ms724451.aspx

    Yes it uses void main, but that function call does work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  2. Replies: 6
    Last Post: 07-07-2008, 07:48 AM
  3. School Mini-Project on C/C++ (Need Your Help)..
    By EazTerence in forum C++ Programming
    Replies: 4
    Last Post: 09-08-2005, 01:08 AM
  4. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 07:12 AM
  5. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM