[wing] utils, return also build number and type for OS version



commit 557c8d68f910de4a51aaa048e49f4d32843d40ad
Author: Davide Benotto <benotto amazon com>
Date:   Mon Dec 16 11:20:20 2019 +0100

    utils, return also build number and type for OS version

 wing/wingutils.c | 6 +++++-
 wing/wingutils.h | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/wing/wingutils.c b/wing/wingutils.c
index 4bdd4a7..bbe1d75 100644
--- a/wing/wingutils.c
+++ b/wing/wingutils.c
@@ -49,7 +49,9 @@ wing_is_os_64bit (void)
 
 gboolean
 wing_get_version_number (gint *major,
-                         gint *minor)
+                         gint *minor,
+                         gint *build,
+                         gint *product_type)
 {
   typedef NTSTATUS (WINAPI fRtlGetVersion) (PRTL_OSVERSIONINFOEXW);
   OSVERSIONINFOEXW osverinfo;
@@ -70,6 +72,8 @@ wing_get_version_number (gint *major,
 
   *major = osverinfo.dwMajorVersion;
   *minor = osverinfo.dwMinorVersion;
+  *build = osverinfo.dwBuildNumber;
+  *product_type = osverinfo.wProductType;
 
   return TRUE;
 }
diff --git a/wing/wingutils.h b/wing/wingutils.h
index f928cc2..213968c 100644
--- a/wing/wingutils.h
+++ b/wing/wingutils.h
@@ -46,7 +46,9 @@ gboolean     wing_is_os_64bit          (void);
 
 WING_AVAILABLE_IN_ALL
 gboolean     wing_get_version_number   (gint *major,
-                                        gint *minor);
+                                        gint *minor,
+                                        gint *build,
+                                        gint *product_type);
 
 WING_AVAILABLE_IN_ALL
 gboolean     wing_get_process_memory   (gsize *total_virtual_memory,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]