Found this today on MSDN. Can you spot what caused the WTF moment?
if ( osvi.dwMajorVersion == 6 )
{
if( osvi.dwMinorVersion == 0 )
{
if( osvi.wProductType == VER_NT_WORKSTATION )
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Vista "));
else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 " ));
}
if ( osvi.dwMinorVersion == 1 )
{
if( osvi.wProductType == VER_NT_WORKSTATION )
StringCchCat(pszOS, BUFSIZE, TEXT("Windows 7 "));
else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 " ));
}
no subject
Date: 2009-09-24 01:54 am (UTC)no subject
Date: 2009-09-24 04:49 am (UTC)Are you surprised that Windows 7 is just a rebranding of Vista?
no subject
Date: 2009-09-24 04:16 pm (UTC)I hope this doesn't start to look like the Solaris vs SunOS comfusion.