This is probably trivial, but I'm having a tough time figuring out the current version of Windows that Wine is mimicking. I have a situation where I need to behave differently if the version is NT (0x0500) versus when it is XP (0x0600). I see the WINVER #define, but that doesn't seem right to me since this must be a runtime variable. Can someone point me at an example of how to tell what the current version of Windows is? Thanks, Chris
On Wed, Mar 19, 2008 at 1:31 AM, Chris Teague chris.teague@gmail.com wrote:
This is probably trivial, but I'm having a tough time figuring out the current version of Windows that Wine is mimicking. I have a situation where I need to behave differently if the version is NT (0x0500) versus when it is XP (0x0600). I see the WINVER #define, but that doesn't seem right to me since this must be a runtime variable. Can someone point me at an example of how to tell what the current version of Windows is? Thanks, Chris
http://wiki.winehq.org/UsefulRegistryKeys
Search for Version
On Wed, Mar 19, 2008 at 2:02 AM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 1:31 AM, Chris Teague chris.teague@gmail.com wrote:
This is probably trivial, but I'm having a tough time figuring out the current version of Windows that Wine is mimicking. I have a situation where I need to behave differently if the version is NT (0x0500) versus when it is XP (0x0600). I see the WINVER #define, but that doesn't seem right to me since this must be a runtime variable. Can someone point me at an example of how to tell what the current version of Windows is? Thanks, Chris
http://wiki.winehq.org/UsefulRegistryKeys
Search for Version
More direct perhaps http://source.winehq.org/git/wine.git/?a=blobdiff;f=tools/wine.inf;h=97a7735...
On 19/03/2008, Chris Teague chris.teague@gmail.com wrote:
This is probably trivial, but I'm having a tough time figuring out the current version of Windows that Wine is mimicking. I have a situation where I need to behave differently if the version is NT (0x0500) versus when it is XP (0x0600). I see the WINVER #define, but that doesn't seem right to me since this must be a runtime variable. Can someone point me at an example of how to tell what the current version of Windows is? Thanks,
Wine does not use the WINVER, or other associated version defines when building a project - it automatically uses the latest Windows version (although the API exposed may be incomplete due to missing functions).
Programatically, you can use GetVersionEx [http://msdn2.microsoft.com/en-us/library/ms724451.aspx] to determine the version of Windows at runtime in your program, although Microsoft recommend using VerifyVersionInfo (see [http://msdn2.microsoft.com/en-us/library/ms725491(VS.85).aspx] for an example of its usage).
To change the version in Wine you can use winecfg (the 'Windows Version' property on the 'Applications' tab).
HTH, - Reece
Chris Teague wrote:
This is probably trivial, but I'm having a tough time figuring out the current version of Windows that Wine is mimicking. I have a situation where I need to behave differently if the version is NT (0x0500) versus when it is XP (0x0600). I see the WINVER #define, but that doesn't seem right to me since this must be a runtime variable. Can someone point me at an example of how to tell what the current version of Windows is? Thanks,
Errm, GetVersion()?
If you're a developer for a Windows application it is a much better policy to check for features rather than checking the Windows version, since that feature may be implemented in a later service pack for that version of Windows.