
/*
  File: include/basic/win_ostest.h
  Description: Windows version query functions
  Part of the Mantis project
  (c) 2002 Lycos Inc.

  This file is distributed for the sole purpose of allowing you to write
  software to interface with Sonique 2 and other Mantis programs. It is
  not to be modified or used for any other purpose without written
  authorization.

  If you redistribute this file, it must be in the original package
  complete with all other files provided, including the usage agreement.

  Do not remove this notice.
*/

#ifndef _WINDOWS_STEST_H__
#define _WINDOWS_STEST_H__


inline bool IsUnicodeFileSystem()
{
	OSVERSIONINFO osvi;  
	
	memset( &osvi, 0, sizeof(osvi) );
	osvi.dwOSVersionInfoSize = sizeof( osvi );

	if( GetVersionEx( &osvi ) != 0 )	
		return osvi.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS;

	return false;
}

inline bool OsHasBuggyRegions()
{
	OSVERSIONINFO osvi;  
	
	memset( &osvi, 0, sizeof(osvi) );
	osvi.dwOSVersionInfoSize = sizeof( osvi );

	if( GetVersionEx( &osvi ) != 0 )	
	{
		// NT4 does.. others don't	

		bool isNT4 = (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) && ( osvi.dwMajorVersion <= 4 );

		return isNT4;
	}
	return true;	
}

#endif
