![]() |
|
#4
|
|||
|
|||
![]() Цитата:
UPD может кому пригодится This is because the WOW64 file system redirection, if your 32-bit app that want to gain access to the native system32 directory, you must use the Wow64DisableWow64FsRedirectionfunction or the Sysnative Alias. Wow64DisableWow64FsRedirection Try this sample Код:
{$APPTYPE CONSOLE} uses SysUtils, Windows; Function Wow64DisableWow64FsRedirection(Var Wow64FsEnableRedirection: LongBool): LongBool; StdCall; External 'Kernel32.dll' Name 'Wow64DisableWow64FsRedirection'; Function Wow64EnableWow64FsRedirection(Wow64FsEnableRedirection: LongBool): LongBool; StdCall; External 'Kernel32.dll' Name 'Wow64EnableWow64FsRedirection'; Var Wow64FsEnableRedirection: LongBool; begin try if Wow64DisableWow64FsRedirection(Wow64FsEnableRedirection) then begin if FileExists('c:\windows\system32\alg.exe') then Writeln('fe') else Writeln('fne'); if not Wow64EnableWow64FsRedirection(Wow64FsEnableRedirection) then RaiseLastOSError; end else RaiseLastOSError; except on E:Exception do Writeln(E.Classname, ':', E.Message); end; Writeln('Press Enter to exit'); Readln; end. end. https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx |