From: Nicolas <nic...@un...> - 2001-07-17 11:13:43
|
Hello, Here is a patch to the win32api, I hope it could help. This patch deals with the system version api, and make possible to find t= he=20 system version of the computer as shown on msdn web site=20 <http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_92jy.htm>. I'm so= rry=20 I did it with win32api 0.5.1, but I hope it should be applied to the last= =20 version. There is another question about the sources of this patch, the values of = the=20 new defines, and the new structs were taken from the MSSDK, so I suppose = that=20 it is possible to include them in the Winbase.h file, but I'm not shure (= Are=20 there redistributable components, as mentionned in the MS License ? ). Cordialy, --=20 Nicolas Vi=E9ville. --- ./w32api-0.5.1/include/winbase.h=09Sun Apr 8 15:30:13 2001 +++ ./winbase.h=09Thu May 10 17:17:58 2001 @@ -430,7 +430,22 @@ #define VER_PLATFORM_WIN32s 0 #define VER_PLATFORM_WIN32_WINDOWS 1 #define VER_PLATFORM_WIN32_NT 2 -#define BACKUP_INVALID=090 +#define VER_SERVER_NT 0x80000000 +#define VER_WORKSTATION_NT 0x40000000 +#define VER_SUITE_SMALLBUSINESS 0x00000001 +#define VER_SUITE_ENTERPRISE 0x00000002 +#define VER_SUITE_BACKOFFICE 0x00000004 +#define VER_SUITE_COMMUNICATIONS 0x00000008 +#define VER_SUITE_TERMINAL 0x00000010 +#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020 +#define VER_SUITE_EMBEDDEDNT 0x00000040 +#define VER_SUITE_DATACENTER 0x00000080 +#define VER_SUITE_SINGLEUSERTS 0x00000100 +#define VER_SUITE_PERSONAL 0x00000200 +#define VER_NT_WORKSTATION 0x0000001 +#define VER_NT_DOMAIN_CONTROLLER 0x0000002 +#define VER_NT_SERVER 0x0000003 +#define BACKUP_INVALID 0 #define BACKUP_DATA 1 #define BACKUP_EA_DATA 2 #define BACKUP_SECURITY_DATA 3 @@ -857,6 +872,32 @@ =09DWORD dwPlatformId; =09WCHAR szCSDVersion[128]; } OSVERSIONINFOW,*POSVERSIONINFOW,*LPOSVERSIONINFOW; +typedef struct _OSVERSIONINFOEXA { +=09DWORD dwOSVersionInfoSize; +=09DWORD dwMajorVersion; +=09DWORD dwMinorVersion; +=09DWORD dwBuildNumber; +=09DWORD dwPlatformId; +=09CHAR szCSDVersion[ 128 ]; +=09WORD wServicePackMajor; +=09WORD wServicePackMinor; +=09WORD wSuiteMask; +=09BYTE wProductType; +=09BYTE wReserved; +} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; +typedef struct _OSVERSIONINFOEXW { +=09DWORD dwOSVersionInfoSize; +=09DWORD dwMajorVersion; +=09DWORD dwMinorVersion; +=09DWORD dwBuildNumber; +=09DWORD dwPlatformId; +=09WCHAR szCSDVersion[ 128 ]; +=09WORD wServicePackMajor; +=09WORD wServicePackMinor; +=09WORD wSuiteMask; +=09BYTE wProductType; +=09BYTE wReserved; +} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW; typedef struct _MEMORYSTATUS { =09DWORD dwLength; =09DWORD dwMemoryLoad; @@ -1578,6 +1619,7 @@ typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA; typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO; typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXW=20 OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW #define AddAtom AddAtomW #define BackupEventLog BackupEventLogW @@ -1714,6 +1756,7 @@ typedef WIN32_FIND_DATAA WIN32_FIND_DATA,*LPWIN32_FIND_DATA; typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO; typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXA=20 OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA #define AddAtom AddAtomA #define BackupEventLog BackupEventLogA |