Rev 21 | Blame | Compare with Previous | Last modification | View Log | RSS feed
//-------------------------------------------------------------------------------------------
// os_info.c - request the OS type and version
//
// this source code is published under GPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// wihout the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
//
// what who when
// first steps AR 07.11.1999
//
//-------------------------------------------------------------------------------------------
// INCLUDES
//
#include <windows.h>
//-------------------------------------------------------------------------------------------
// DEFINES
//
//-------------------------------------------------------------------------------------------
// TYPEDEFS
//
//-------------------------------------------------------------------------------------------
// LOCALS
//
//-------------------------------------------------------------------------------------------
// EXTERNALS
//
//-------------------------------------------------------------------------------------------
// GLOBALS
//
//-------------------------------------------------------------------------------------------
// FUNCTIONS
//
BOOLEAN IsWindowsNT(void)
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
return TRUE;
}
else
return FALSE;
}
BOOLEAN IsWindows95(void)
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 0))
return TRUE;
}
return FALSE;
}
BOOLEAN IsWindows98(void)
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
if ((osvi.dwMajorVersion > 4) ||
((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion > 0)))
return TRUE;
}
return FALSE;
}
/*
BOOLEAN IsWindowsBlaBla(void)
{
}
*/