Skip Menu |

This queue is for tickets about the Win32 CPAN distribution.

Report information
The Basics
Id: 57172
Status: resolved
Priority: 0/
Queue: Win32

People
Owner: Nobody in particular
Requestors: mb [...] otrs.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Windows 2008 Server version detection by GetOSVersion()
GetOSVersion() returns "Win7" when running on Windows 2008 R2. According to http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx they both return dwMajorVersion 6 and dwMinorVersion 1, the only difference is that for Win7 OSVERSIONINFOEX.wProductType = VER_NT_WORKSTATION and for Win2008SP1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION I understand that adding this kind of 'smartness' into GetOSVersion is not desired, but I don't really see an alternative. Otherwise, I guess this should at least be added to the docs.
On Mon May 03 10:52:19 2010, https://launchpad.net/~michiel-beijen wrote: Show quoted text
> GetOSVersion() returns "Win7" when running on Windows 2008 R2. > > According to http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx > they both return dwMajorVersion 6 and dwMinorVersion 1, the only > difference is that for Win7 OSVERSIONINFOEX.wProductType = > VER_NT_WORKSTATION and for Win2008SP1 OSVERSIONINFOEX.wProductType != > VER_NT_WORKSTATION > > I understand that adding this kind of 'smartness' into GetOSVersion is > not desired, but I don't really see an alternative. Otherwise, I guess > this should at least be added to the docs.
A fix has been committed to the repo in https://code.google.com/p/libwin32/source/detail?r=516