Thread: C API for Hard Ware Configuration

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    2

    Unhappy C API for Hard Ware Configuration

    Is there any C API for knowing the Hardware Configuration like CPU Number , CPU clock Speed , Total Memory , Size of Swap partion , Disk Size etc . If so please do help . It would be a great help, really stuggling to find it out .

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Like the win api?

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    2
    Yeah Like the Win API , does WIN API supports such functionality

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    351
    you could try researching snmp.

    it can give you all this info and you can access it remotely.

    you have to install server and clients, and there's a c library. probably more than what you want.

    www.net-snmp.com

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    I'm guessing that this is a Linux/Unix OS. You might want to look up the code for the free and df commands for figuring out the total mem and partition information. Usually you can find the source code somewhere on the system if you do a find, and if not I'm sure you can find it on the web. I don't know of an API per say, but you can most likely find this code somewhere on your system.

    I'm sorry to say the only way I know of of getting CPU information is to write assembly macros. Then again, I've been known to be wrong before.

    starX
    www.axisoftime.com

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    skumar I take it you are running some version of windows. Yes the api can do all of this. However, some of the stuff you want isn't well documented and does require a bit of looking around.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Want to learn Windows API for Game Programming
    By George M. in forum Windows Programming
    Replies: 15
    Last Post: 09-28-2008, 10:26 AM
  2. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  3. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  4. Is it foolish to program with Win32 API ?
    By Kelvin in forum Windows Programming
    Replies: 2
    Last Post: 07-09-2002, 02:03 PM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM