/ gwsupport.h / Functions / Description

Functions



gw_win32_get_version

Gets the system version number and service pack number.
int gw_win32_get_version ( int *sys_type, int *version_major, int *version_minor, int *service_pack);
This function gets the system version number and service pack number.
This works for Win 3.x(Win32s) and Win/95/98/ME and also Win/NT/2000.
sys_type has the following values :
  • 0 = Unknown
  • 1 = Win 3.x
  • 2 = Win 95
  • 3 = Win 98
  • 4 = Win ME
  • 5 = Win NT
  • 6 = Win 2000
  • 7 = Win XP
  • 8 = Win Server 2003 familly
version_major is (e.g.) 4 for Win/NT, 5 for Win/2000.
version_minor is (e.g.) 51 for NT v3.51, 0 for NT v 4.00.
service_pack (service pack #) is meaningful for NT or 2000 (and also for Win/95, where it is returned as 0 or 1 to indicate Win/95 or Win/95B(OSR2) respectively).


Parameters
sys_type type of system
version_major major version of system
version_minor minor version of system
service_pack service pack number of system

Result: an error code.
Returns 0 when it's done. Returns 606 when it's unable to identify system type.
Returns 648 when it's unable to load library.
Returns 649 when disk name may be invalid or Disk not accessible.
.


gw_os_get_version_str

Gets the operating system version.
int gw_os_get_version_str ( gchar **version);
This function gets the formatted operating system version.


Parameters
version string to store system version must be freed with g_free().

Result: an error code.
Returns 0 when it's done. Returns -1 when an error occured..