Version of Windows

Reece Dunn msclrhd at googlemail.com
Wed Mar 19 02:12:01 CDT 2008


On 19/03/2008, Chris Teague <chris.teague at 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



More information about the wine-devel mailing list