Skip to content
  • Chun-wei Fan's avatar
    gwin32: Add g_win32_check_windows_version() API · bcbf80c3
    Chun-wei Fan authored
    This adds a public API where one can use to see whether the running version
    of Windows where the code is run is at least the specified version, service
    pack level, and the type (non-server, server, any) of the running Windows
    OS.
    
    This API is done as:
    -GetVersion()/GetVersionEx() changed in the way they work since Windows 8.1
     [1][2], so a newer mechanism to check the version of the running Windows
     operating system is needed.  MSDN also states that GetVersion() might be
     further changed or removed after Windows 8.1.  This provides a wrapper for
     VerfyVersionInfo() as well in GLib for most cases, which was recommended
     in place of g_win32_get_windows_version() for more detailed Windows
     version checking.
    -Provides an OS-level functionality check, for those that we don't need to
     venture into GetProcAddress(), and also to determine system API behavior
     changes due to differences in OS versions.
    
    Also added a note for the g_win32_get_windows_version() API that since the
    behavior of GetVersion() which it uses, is changed since Windows 8.1, users
    of the API should be aware.
    
    [1]:
    http://msdn.microsoft.com/zh-tw/library/windows/desktop/ms724451%28v=vs.85%29.aspx
    [2]:
    http://msdn.microsoft.com/zh-tw/library/windows/desktop/ms724451%28v=vs.85%29.aspx
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741895
    bcbf80c3