- s_ver = wxWINDOWS;
- info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- if ( ::GetVersionEx(&info) )
- {
- s_major = info.dwMajorVersion;
- s_minor = info.dwMinorVersion;
+ return wow64 != FALSE;
+#endif // Win64/Win32
+}
+
+wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
+{
+ OSVERSIONINFO info;
+ wxZeroMemory(info);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if ( ::GetVersionEx(&info) )
+ {
+ if (verMaj) *verMaj = info.dwMajorVersion;
+ if (verMin) *verMin = info.dwMinorVersion;
+ }
+
+#if defined( __WXWINCE__ )
+ return wxOS_WINDOWS_CE;
+#elif defined( __WXMICROWIN__ )
+ return wxOS_WINDOWS_MICRO;
+#else
+ switch ( info.dwPlatformId )
+ {
+ case VER_PLATFORM_WIN32_NT:
+ return wxOS_WINDOWS_NT;
+
+ case VER_PLATFORM_WIN32_WINDOWS:
+ return wxOS_WINDOWS_9X;
+ }
+
+ return wxOS_UNKNOWN;
+#endif
+}