locked
testing for Vista RRS feed

  • Question

  • When i test for vista using the stock code below, the result is XP details.
    My setup is dual boot, C:\ XP and F:\ Vista. Vista is home premium that overrites the previous XP installation.
    Given the above, is this then a bug?

    Code:
    bool IsVista(){
       OSVERSIONINFO osver;
       osver.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
       if(::GetVersionEx(&osver) && osver.dwPlatformId == VER_PLATFORM_WIN32_NT && (osver.dwMajorVersion >= 6))
         return true;
       return false;
    }

    cheers Angus
    Thursday, April 5, 2007 5:24 AM

All replies

  • Does your application have a Windows Vista manifest? If not it may be that you are triggering some sort of Application Compatibility shim. If not try embedding one to see if that helps.
    Thursday, April 5, 2007 7:54 PM