Rev 17 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
//-------------------------------------------------------------------------------------------
// os_info.c - request the OS type and version
//
// (c) 1999-2004 ARW Elektronik, Germany
//
// 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
//
//
// $Log: os_info.c,v $
// Revision 1.2 2004/07/24 07:47:00 klaus
// Update copyright to 2004
//
// Revision 1.1.1.1 2003/11/14 23:17:18 klaus
// First put into repository
//
// Revision 1.2 2002/10/27 17:05:33 klaus
// CVS log added, file addressing bug > 2 Gbtye circumvent
//
// what who when
// first steps AR 07.11.1999
// small change in OS version recognition AR 21.05.2002
//
//-------------------------------------------------------------------------------------------
// 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;
else
return FALSE;
}
else
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;
else
return FALSE;
}
else
return FALSE;
}
/*
BOOLEAN IsWindowsBlaBla(void)
{
}
*/