WINVER 이고요,
이 값이 뭘 가지느냐에 따라
OS를 판단하면 됩니다.
Windows "Longhorn" WINVER>=0x0600
Windows Server 2003 WINVER>=0x0503
Windows XP WINVER>=0x0501
Windows 2000 WINVER>=0x0500
Windows NT 4.0 WINVER>=0x0400
XP를 쓰면 보통
WINVER == 0x0501
값이 됩니다.
아래는 간단히 윈도 버전을 판단할 수 있는 매크로입니다.
//Windows version macros
#define WinVerMajor() LOBYTE(LOWORD(GetVersion()))
#define WinVerMinor() HIBYTE(LOWORD(GetVersion()))
#define IsWinVerNTs() (GetVersion() < 0x80000000)
#define IsWinVerNT351Plus() (IsWinVerNTs() && WinVerMajor() >= 3)
#define IsWinVerNT4Plus() (IsWinVerNTs() && WinVerMajor() > 3)
#define IsWinVer98Plus() (LOWORD(GetVersion()) != 4)
#define IsWinVerMEPlus() (WinVerMajor() >= 5 || WinVerMinor() > 10)
#define IsWinVer2000Plus() (WinVerMajor() >= 5)
#define IsWinVerXPPlus() (WinVerMajor() >= 5 && LOWORD(GetVersion()) != 5)
Using the macros
These examples will show you how easilyy you can use the macros in your applications:
// Example 1:
if (IsWinVerMEPlus())
{
printf("If you can see this message you"
" are running Windows ME or higher! \n");
}
else
{
printf("If you can see this message you are running Windows 95 or 98! \n");
}
// Example 2:
if (IsWinVerXPPlus())
{
// Jun-01-2005
printf("If you can see this message you are running Windows XP or 2003! \n");
}
// Example 3:
if (IsWinVer2000Plus())
{
printf("Your operating system supports the opacity"
" and transparency color key of a layered window! \n");
}
이 부분 출처는 코플
http://www.codeproject.com/macro/winver_macros.asp