if(dwVersion < 0x80000000) { ulOSType |= OS_NT; if(dwWindowsMajorVersion == 3) ulOSType |= OS_NT3; else if(dwWindowsMajorVersion == 4) ulOSType |= OS_NT4; else ulOSType |= OS_NT5; } else if(dwWindowsMajorVersion == 4) { ulOSType |= OS_WIN9x; if(dwWindowsMinorVersion == 0) { ulOSType |= OS_WIN95;
case 4: ulOSType |= OS_NT4; break;
void DetermineOSVersion(){  DWORD         dwVersion;  DWORD         dwWindowsMajorVersion;  DWORD         dwWindowsMinorVersion;  DWORD         dwWindowsVersion;  BOOL          bIsWin95Debute;  char          szESetupRequirement[MAX_BUF];  ulOSType        = 0;  dwVersion       = GetVersion();  bIsWin95Debute  = IsWin95Debute();  // Get major and minor version numbers of Windows  dwWindowsMajorVersion =  (DWORD)(LOBYTE(LOWORD(dwVersion)));  dwWindowsMinorVersion =  (DWORD)(HIBYTE(LOWORD(dwVersion)));  dwWindowsVersion      =  (DWORD)(HIWORD(dwVersion));  // Get build numbers for Windows NT or Win95/Win98  if(dwVersion < 0x80000000) // Windows NT  {    ulOSType |= OS_NT;    if(dwWindowsMajorVersion == 3)      ulOSType |= OS_NT3;    else if(dwWindowsMajorVersion == 4)      ulOSType |= OS_NT4;    else      ulOSType |= OS_NT5;  }  else if(dwWindowsMajorVersion == 4)  {    ulOSType |= OS_WIN9x;    if(dwWindowsMinorVersion == 0)    {      ulOSType |= OS_WIN95;      if(bIsWin95Debute)        ulOSType |= OS_WIN95_DEBUTE;    }    else      ulOSType |= OS_WIN98;  }  else  {    if(GetPrivateProfileString("Messages", "ERROR_SETUP_REQUIREMENT", "",                               szESetupRequirement, sizeof(szESetupRequirement),                                szFileIniUninstall))      PrintError(szESetupRequirement, ERROR_CODE_HIDE);    exit(1);  }}