Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PProcess::GetOSHardware (  ) [static, inherited]

Get the hardware the process is running on, eg "sparc".

Returns:
String for OS name.

Definition at line 1663 of file win32.cxx.

Referenced by PVideoInputDevice_FakeVideo::GrabTextVideoFrame(), PTrace::Initialise(), Serial::Main(), Md5::Main(), Threadex::Main(), IPV6Test::Main(), DtmfTest::Main(), and LocalAddress::Main().

{
  SYSTEM_INFO info;
  GetSystemInfo(&info);
  switch (info.wProcessorArchitecture) {
    case PROCESSOR_ARCHITECTURE_INTEL :
      switch (info.dwProcessorType) {
        case PROCESSOR_INTEL_386 :
          return "i386";
        case PROCESSOR_INTEL_486 :
          return "i486";
        case PROCESSOR_INTEL_PENTIUM :
          return "i586";
      }
      return "iX86";

    case PROCESSOR_ARCHITECTURE_MIPS :
      return "mips";

    case PROCESSOR_ARCHITECTURE_ALPHA :
      return "alpha";

    case PROCESSOR_ARCHITECTURE_PPC :
      return "ppc";
  }
  return "?";
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index