AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Windows 7 64Bit Redirection

Ein Thema von amigage · begonnen am 10. Nov 2010 · letzter Beitrag vom 29. Nov 2010
 
gore

Registriert seit: 9. Jun 2006
Ort: Magdeburg
29 Beiträge
 
Delphi 7 Professional
 
#23

AW: Windows 7 64Bit Redirection

  Alt 15. Nov 2010, 11:47
64Bit Redirection? Wieso immer gleich mit Kanonen auf Spatzen schießen? Die erste Antwort von jfheins ist Microsoft konform.

Zitat:
32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. This mechanism is flexible and easy to use, therefore, it is the recommended mechanism to bypass file system redirection. Note that 64-bit applications cannot use the Sysnative alias as it is a virtual directory not a real one.

Solange man mit Delphi keine 64bit Programme erzeugen kann, reicht folgendes:
  if IsProcess32OnWin64(GetCurrentProcess) then Exe:='%WinDir%\Sysnative\osk.exeelse Exe:='%WinDir%\system32\osk.exe';

IsProcess32OnWin64 ist gleichbedeutend mit Deiner Is64BitViaRegistry (und ist auch Microsoft konform).
Delphi-Quellcode:
function IsProcess32OnWin64(ProcessHandle:THandle):boolean;
type
  TIsWow64Process = function(Handle: THandle; var Res: BOOL): BOOL; stdcall; // Type of IsWow64Process API fn
var
  IsWow64Result: BOOL; // Result from IsWow64Process
  IsWow64Process: TIsWow64Process; // IsWow64Process fn reference
begin
  result:=false;
  IsWow64Process := GetProcAddress( GetModuleHandle('kernel32.dll'), 'IsWow64Process' );
  if Assigned(IsWow64Process) then begin
    if IsWow64Process(ProcessHandle,IsWow64Result) AND IsWow64Result then result:=true;
  end; // google: Running 32-bit Applications (Windows)
end;

function IsProcess64bit(ProcessHandle:THandle):boolean;
begin
  result:= IsWin64bit AND not IsProcess32OnWin64(ProcessHandle);
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz