* Fix building for WinCE (KEY_WOW64_xx constants do not exist there), resolves #24587

git-svn-id: trunk@24882 -
This commit is contained in:
sergei 2013-06-12 12:42:42 +00:00
parent 5e1b3b303a
commit 64cf141f0c
2 changed files with 5 additions and 4 deletions

View File

@ -25,9 +25,10 @@ Const
KEY_READ = Windows.KEY_READ;
KEY_SET_VALUE = Windows.KEY_SET_VALUE;
KEY_WRITE = Windows.KEY_WRITE;
{$ifndef WinCE}
KEY_WOW64_64KEY = Windows.KEY_WOW64_64KEY;
KEY_WOW64_32KEY = Windows.KEY_WOW64_32KEY;
{$endif WinCE}
{$else}
Const

View File

@ -151,8 +151,8 @@ begin
Result:=false;
OldAccess:=FAccess;
try
FAccess:=KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or STANDARD_RIGHTS_READ or
(OldAccess and (KEY_WOW64_64KEY or KEY_WOW64_32KEY));
FAccess:=KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or STANDARD_RIGHTS_READ
{$ifndef WinCE} or (OldAccess and (KEY_WOW64_64KEY or KEY_WOW64_32KEY)) {$endif};
KeyHandle:=GetKey(Key);
if KeyHandle<>0 then
begin
@ -210,7 +210,7 @@ Var
OldAccess: LongWord;
begin
OldAccess:=fAccess;
fAccess:=KEY_READ or (OldAccess and (KEY_WOW64_64KEY or KEY_WOW64_32KEY));
fAccess:=KEY_READ {$ifndef WinCE} or (OldAccess and (KEY_WOW64_64KEY or KEY_WOW64_32KEY)) {$endif};
try
Result:=OpenKey(Key, False);
finally