DWORD         dwBuildNumber;
void DetermineOSVersionEx(){  DWORD         dwBuildNumber;  BOOL          bIsWin95Debute;  char          szBuf[MAX_BUF];  char          szOsType[MAX_BUF];  char          szESetupRequirement[MAX_BUF];  OSVERSIONINFO osVersionInfo;  MEMORYSTATUS  msMemoryInfo;  ulOSType = 0;  osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);  if(!GetVersionEx(&osVersionInfo))  {    /* GetVersionEx() failed for some reason.  It's not fatal, but could cause     * some complications during installation */    char szEMsg[MAX_BUF_TINY];    if(NS_LoadString(hSetupRscInst, IDS_ERROR_GETVERSION, szEMsg, sizeof(szEMsg)) == WIZ_OK)      PrintError(szEMsg, ERROR_CODE_SHOW);  }  bIsWin95Debute  = IsWin95Debute();  switch(osVersionInfo.dwPlatformId)  {    case VER_PLATFORM_WIN32_WINDOWS:      ulOSType |= OS_WIN9x;      if(osVersionInfo.dwMinorVersion == 0)      {        ulOSType |= OS_WIN95;        lstrcpy(szOsType, "Win95");        if(bIsWin95Debute)        {          ulOSType |= OS_WIN95_DEBUTE;          lstrcpy(szOsType, "Win95 debute");        }      }      else        ulOSType |= OS_WIN98;        lstrcpy(szOsType, "Win98");      break;    case VER_PLATFORM_WIN32_NT:      ulOSType |= OS_NT;      switch(osVersionInfo.dwMajorVersion)      {        case 3:          ulOSType |= OS_NT3;          lstrcpy(szOsType, "NT3");          break;        case 4:          ulOSType |= OS_NT4;          lstrcpy(szOsType, "NT4");          break;        default:          ulOSType |= OS_NT5;          lstrcpy(szOsType, "NT5");          break;      }      break;    default:      if(NS_LoadString(hSetupRscInst, IDS_ERROR_SETUP_REQUIREMENT, szESetupRequirement, sizeof(szESetupRequirement)) == WIZ_OK)        PrintError(szESetupRequirement, ERROR_CODE_HIDE);      break;  }  dwBuildNumber  = (DWORD)(LOWORD(osVersionInfo.dwBuildNumber));  msMemoryInfo.dwLength = sizeof(MEMORYSTATUS);  GlobalMemoryStatus(&msMemoryInfo);  wsprintf(szBuf,"    System Info:\n\        OS Type: %s\n\        Major Version: %d\n\        Minor Version: %d\n\        Build Number: %d\n\        Extra String: %s\n\        Total Physical Memory: %dKB\n\        Total Available Physical Memory: %dKB\n",           szOsType,           osVersionInfo.dwMajorVersion,           osVersionInfo.dwMinorVersion,           dwBuildNumber,           osVersionInfo.szCSDVersion,           msMemoryInfo.dwTotalPhys/1024,           msMemoryInfo.dwAvailPhys/1024);  UpdateInstallStatusLog(szBuf);}