- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Host::CSystemInformation Class Reference

List of all members.

## Detailed Description

Provides info about the host system.

DO NOT call CPU speed in any tight loops. Its is VERY cpu heavy and will kill
your other threads. Use at load / idle only. And dont rely on it for computing timers
or anything else of that nature

Date:
  21/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.1.0 Added stream output and made writing all stream based (yay for streams!!)

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CSystemInformation.hpp,v 1.4 2007/02/08 21:06:44 paul Exp

Definition at line 42 of file CSystemInformation.hpp.

## Static Public Member Functions

- static DWORD determineTimeStamp ()
- static void dumpSystemInfoToFile (CTextStream &stream)
- static void dumpSystemInfoToFile (CSystemString &path)
- static CString getComputerName ()
- static CString getCpuNameString ()
- static long getCpuSpeed ()
- static long getNumberOfProcessors ()
- static bool getOperatingSystemVersion (CString &string)
- static void getOsVersionInfo (long &major, long &minor, long &build)
- static void getSystemInfo (SSystemInformation &sys)
- static CString getUserName ()

## Member Function Documentation

static DWORD Exponent::Host::CSystemInformation::determineTimeStamp | ( |  | ) | `[static]`

Determine the time stamp for measuring CPU speed

Return values:

  | DWORD | The time stamp

static void Exponent::Host::CSystemInformation::dumpSystemInfoToFile | ( | CTextStream & | stream | ) | `[static]`

Output the system logs to the the supplied stream

Parameters:

  | stream | The text stream

static void Exponent::Host::CSystemInformation::dumpSystemInfoToFile | ( | CSystemString & | path | ) | `[static]`

Dump all information to a text file

Parameters:

  | path | The path to write the data to

static CString Exponent::Host::CSystemInformation::getComputerName | ( |  | ) | `[static]`

Get the computer name

Return values:

  | CString | On return filled with the computer name

static CString Exponent::Host::CSystemInformation::getCpuNameString | ( |  | ) | `[static]`

Get a string representing the CPU

Return values:

  | CString | On return stores a string representing the CPU speed

static long Exponent::Host::CSystemInformation::getCpuSpeed | ( |  | ) | `[static]`

Get the CPU speed

Return values:

  | long | The CPU speed

static long Exponent::Host::CSystemInformation::getNumberOfProcessors | ( |  | ) | `[static]`

Get the number of processors

Return values:

  | long | The number of processors

static bool Exponent::Host::CSystemInformation::getOperatingSystemVersion | ( | CString & | string | ) | `[static]`

Get a string representing the os version

Parameters:

  | string | On return stores the os version

Return values:

  | bool | True if filled string properly, false otherwise

static void Exponent::Host::CSystemInformation::getOsVersionInfo | ( | long & | major,
|  | long & | minor,
|  | long & | build |
| ) |  |  | `[static]`

Get the operating system version

Parameters:

  | major | On return holds the os major verison
  | minor | On return holds the os minor version
  | build | On return holds the os build version

static void Exponent::Host::CSystemInformation::getSystemInfo | ( | SSystemInformation & | sys | ) | `[static]`

Get the info about the system

Parameters:

  | sys | On return is filled with system information

static CString Exponent::Host::CSystemInformation::getUserName | ( |  | ) | `[static]`

Get the logged on user name

Return values:

  | const | CString The name of the current user