From d762903951c882051b4a1e036030fcf368f3091c Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 31 Dec 2014 09:36:39 +0000 Subject: [PATCH] Fixed OS.Version for Delphi XE2 Resolved string typecast warning --- X2UtApp.pas | 2 +- X2UtOS.pas | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/X2UtApp.pas b/X2UtApp.pas index 9e4f913..039346a 100644 --- a/X2UtApp.pas +++ b/X2UtApp.pas @@ -359,7 +359,7 @@ begin GetPropList(Strings.ClassInfo, tkStrings, pProps); for iProp := 0 to iCount - 1 do begin - if VerQueryValue(pBuffer, PChar(string(cName) + '\' + pProps^[iProp]^.Name), + if VerQueryValue(pBuffer, PChar(string(cName) + '\' + string(pProps^[iProp]^.Name)), Pointer(pValue), dVer) then SetStrProp(Strings, pProps[iProp], pValue); end; diff --git a/X2UtOS.pas b/X2UtOS.pas index 6fc78b7..c171fd2 100644 --- a/X2UtOS.pas +++ b/X2UtOS.pas @@ -14,6 +14,7 @@ uses Windows; type + {$IF CompilerVersion < 23} TOSVersionInfoEx = packed record dwOSVersionInfoSize: DWORD; dwMajorVersion: DWORD; @@ -27,6 +28,7 @@ type wProductType: Byte; wReserved: Byte; end; + {$IFEND} //:$ Enumeration of the recognized Operating System versions