Info:TOSVersionInfoEx; 这个用到那个单元?(2分)

  • 主题发起人 主题发起人 softyes
  • 开始时间 开始时间
S

softyes

Unregistered / Unconfirmed
GUEST, unregistred user!
Info:TOSVersionInfoEx; 这个用到那个单元?
 
是OSVersionInfo的扩展 Delphi的Windows.pas中没有定义。自己定义一下吧:
C++:
typedef struct _OSVERSIONINFOEXA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wReserved[2];
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct _OSVERSIONINFOEXW {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wReserved[2];
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
#ifdef UNICODE
typedef OSVERSIONINFOEXW OSVERSIONINFOEX;
typedef POSVERSIONINFOEXW POSVERSIONINFOEX;
typedef LPOSVERSIONINFOEXW LPOSVERSIONINFOEX;
#else
typedef OSVERSIONINFOEXA OSVERSIONINFOEX;
typedef POSVERSIONINFOEXA POSVERSIONINFOEX;
typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX;
#endif // UNICODE

PASCAL:
type
_OSVERSIONINFOEXA = packed record
dwOSVersionInfoSize:DWORD;
dwMajorVersion:DWORD;
dwMinorVersion:DWORD;
dwBuildNumber:DWORD;
dwPlatformId:DWORD;
szCSDVersion:array [0..127] of Char; // Maintenance string for PSS usage
wServicePackMajor:Word;
wServicePackMinor:Word;
wReserved:array [0..1] of Word;
end;
OSVERSIONINFOEXA = _OSVERSIONINFOEXA;
POSVERSIONINFOEXA = ^_OSVERSIONINFOEXA;
LPOSVERSIONINFOEXA = ^_OSVERSIONINFOEXA;
TOSVersionInfoEx = _OSVERSIONINFOEXA;
POSVersionInfoEx = ^TOSVersionInfoEx;


_OSVERSIONINFOEXW = packed record
dwOSVersionInfoSize:DWORD;
dwMajorVersion:DWORD;
dwMinorVersion:DWORD;
dwBuildNumber:DWORD;
dwPlatformId:DWORD;
szCSDVersion:array [0..127] of WideChar; // Maintenance string for PSS usage
wServicePackMajor:Word;
wServicePackMinor:Word;
wReserved:array [0..1] of Word;
end;
OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
POSVERSIONINFOEXW = ^_OSVERSIONINFOEXW;
LPOSVERSIONINFOEXW = ^_OSVERSIONINFOEXW;
 
后退
顶部