From d6c1110ff64be434b82dd54b87d048fa5e20cf15 Mon Sep 17 00:00:00 2001 From: binarymaster Date: Thu, 11 Dec 2014 01:18:05 +0300 Subject: [PATCH] Configurator updated --- src-rdpconfig/MainUnit.dfm | 7 +++++ src-rdpconfig/MainUnit.pas | 53 ++++++++++++++++++++++++++++++++++++- src-rdpconfig/resource.res | Bin 12936 -> 12936 bytes 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src-rdpconfig/MainUnit.dfm b/src-rdpconfig/MainUnit.dfm index f342a77..49a9004 100644 --- a/src-rdpconfig/MainUnit.dfm +++ b/src-rdpconfig/MainUnit.dfm @@ -196,6 +196,13 @@ object MainForm: TMainForm Height = 13 Caption = 'ver.' end + object lsSuppVer: TLabel + Left = 182 + Top = 55 + Width = 70 + Height = 13 + Caption = '[support level]' + end end object Timer: TTimer Interval = 250 diff --git a/src-rdpconfig/MainUnit.pas b/src-rdpconfig/MainUnit.pas index 306a7b7..8feeccf 100644 --- a/src-rdpconfig/MainUnit.pas +++ b/src-rdpconfig/MainUnit.pas @@ -46,6 +46,7 @@ type lsWrapVer: TLabel; bLicense: TButton; gbDiag: TGroupBox; + lsSuppVer: TLabel; procedure FormCreate(Sender: TObject); procedure cbAllowTSConnectionsClick(Sender: TObject); procedure seRDPPortChange(Sender: TObject); @@ -88,6 +89,7 @@ var Ready: Boolean = False; Arch: Byte; OldWow64RedirectionValue: LongBool; + INI: String; function WinStationEnumerateW(hServer: THandle; var ppSessionInfo: PWTS_SESSION_INFOW; var pCount: DWORD): BOOL; stdcall; @@ -440,11 +442,29 @@ begin Reg.Free; end; +function CheckSupport(FV: FILE_VERSION): Byte; +var + VerTxt: String; +begin + Result := 0; + if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then + Result := 1; + if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then + Result := 1; + VerTxt := Format('%d.%d.%d.%d', + [FV.Version.w.Major, FV.Version.w.Minor, FV.Release, FV.Build]); + if Pos('[' + VerTxt + ']', INI) > 0 then + Result := 2; +end; + procedure TMainForm.TimerTimer(Sender: TObject); var - WrapperPath: String; + WrapperPath, INIPath: String; FV: FILE_VERSION; + L: TStringList; + CheckSupp: Boolean; begin + CheckSupp := False; case IsWrapperInstalled(WrapperPath) of -1: begin lsWrapper.Caption := 'Unknown'; @@ -457,6 +477,10 @@ begin 1: begin lsWrapper.Caption := 'Installed'; lsWrapper.Font.Color := clGreen; + CheckSupp := True; + INIPath := ExtractFilePath(ExpandPath(WrapperPath)) + 'rdpwrap.ini'; + if not FileExists(INIPath) then + CheckSupp := False; end; 2: begin lsWrapper.Caption := '3rd-party'; @@ -529,6 +553,33 @@ begin IntToStr(FV.Release)+'.'+ IntToStr(FV.Build); lsTSVer.Font.Color := clWindowText; + lsSuppVer.Visible := CheckSupp; + if CheckSupp then begin + if INI = '' then begin + L := TStringList.Create; + try + L.LoadFromFile(INIPath); + except + + end; + INI := L.Text; + L.Free; + end; + case CheckSupport(FV) of + 0: begin + lsSuppVer.Caption := '[not supported]'; + lsSuppVer.Font.Color := clRed; + end; + 1: begin + lsSuppVer.Caption := '[supported partially]'; + lsSuppVer.Font.Color := clOlive; + end; + 2: begin + lsSuppVer.Caption := '[fully supported]'; + lsSuppVer.Font.Color := clGreen; + end; + end; + end; end; end; diff --git a/src-rdpconfig/resource.res b/src-rdpconfig/resource.res index 883012d4552a667bc99ecb17ced65686f59fde37..f75051114072514b6b787bad79a65815be990e87 100644 GIT binary patch delta 36 pcmeB3?MU5lMw^q7fsp|OST|qQmS$u$-273en~~9UbFCgX3jn#R36cN+ delta 36 pcmeB3?MU5lMw^p?fsp|OST