- function Pub_GetOSInfo: string; {获取Windowns}
- var myWin: string;
- Platform: string;
- BuildNumber: Integer;
- begin
- myWin := '';
- case Win32Platform of
- VER_PLATFORM_WIN32_WINDOWS:
- begin
- Platform := 'Windows 95';
- BuildNumber := Win32BuildNumber and $0000FFFF;
- end;
- VER_PLATFORM_WIN32_NT:
- begin
- Platform := 'Windows NT';
- BuildNumber := Win32BuildNumber;
- end;
- else
- begin
- Platform := 'Windows';
- BuildNumber := 0;
- end;
- end;
- if (Win32Platform = VER_PLATFORM_WIN32_WINDOWS) or
- (Win32Platform = VER_PLATFORM_WIN32_NT) then
- begin
- if Win32CSDVersion = '' then
- myWin := Format('%s %d.%d (Build %d)', [Platform, Win32MajorVersion,
- Win32MinorVersion, BuildNumber])
- else
- myWin := Format('%s %d.%d (Build %d: %s)', [Platform, Win32MajorVersion,
- Win32MinorVersion, BuildNumber, Win32CSDVersion]);
- end
- else
- myWin := Format('%s %d.%d', [Platform, Win32MajorVersion,
- Win32MinorVersion]);
- Result := myWin;
- end;
- function Pub_GetOSMemory: string; {获取Windows 可用物理内存}
- var
- MS: TMemoryStatus;
- begin
- MS.dwLength := SizeOf(TMemoryStatus);
- GlobalMemoryStatus(MS);
- // Result := FormatFloat('#,###" KB"', MS.dwTotalPhys div 1024);
- Result := FormatFloat('#,###" KB"', MS.dwTotalPhys shr 10);
- end;
获取Windowns参数
最新推荐文章于 2025-08-07 22:59:06 发布