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

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

Get the name of the operating system the process is running on, eg "Linux".

Returns:
String for OS name.

Definition at line 1628 of file win32.cxx.

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

{
  OSVERSIONINFO info;
  info.dwOSVersionInfoSize = sizeof(info);
  GetVersionEx(&info);
  switch (info.dwPlatformId) {
    case VER_PLATFORM_WIN32s :
      return "32s";

#ifdef VER_PLATFORM_WIN32_CE
    case VER_PLATFORM_WIN32_CE :
      return "CE";
#endif

    case VER_PLATFORM_WIN32_WINDOWS :
      if (info.dwMinorVersion < 10)
        return "95";
      if (info.dwMinorVersion < 90)
        return "98";
      return "ME";

    case VER_PLATFORM_WIN32_NT :
      if (info.dwMajorVersion < 5)
        return "NT";
    else if (info.dwMinorVersion == 0) 
      return "2000";
    else if (info.dwMinorVersion == 1)
      return "XP";
    else
      return "Server 2003";
  }
  return "?";
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index