![]() |
ermitteln ob 32 Bit oder 64 Bit Betriebssystem
Hallo zusammen,
ich musste gerade feststellen, dass ein bestimmtes Programm welches ich unter VISTA 64 Bit programmiert hatte und welches auch in die Registry schreibt unter Vista 32 Bit nicht richtig funktioniert. Unter Vista 64 Bit schreibe ich in den Schlüssel -> HKEY_LOCAL_Machine\Software\Wow6432Node\... In der Suche habe ich hier nichts gefunden, auf MSDN folgenden C#-Code-Schnipsel: Zitat:
Kann mir hier jemand helfen? Schon mal Danke vorab! |
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
Gibts in der Jedi:
IsWindows64 in JclSysInfo. Da aktuell Delphi nur 32-Bit Exen erzeugen kann ist dieser Codeabschnitt für dich nicht gerade brauchbar. |
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
Delphi-Quellcode:
function IsWindows64: Boolean;
type TIsWow64Process = function( // Type of IsWow64Process API fn Handle: Windows.THandle; var Res: Windows.BOOL ): Windows.BOOL; stdcall; var IsWow64Result: Windows.BOOL; // Result from IsWow64Process IsWow64Process: TIsWow64Process; // IsWow64Process fn reference begin // Try to load required function from kernel32 IsWow64Process := Windows.GetProcAddress( Windows.GetModuleHandle('kernel32'), 'IsWow64Process' ); if Assigned(IsWow64Process) then begin // Function is implemented: call it if not IsWow64Process( Windows.GetCurrentProcess, IsWow64Result ) then raise SysUtils.Exception.Create('IsWindows64: bad process handle'); // Return result of function Result := IsWow64Result; end else // Function not implemented: can't be running on Wow64 Result := False; end; |
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
@ Bernhard,
Jedi habe ich (noch) nicht installiert... @API, perfekt, funktioniert! Danke! :thumb: |
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
Zitat:
|
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
Zitat:
![]() |
Re: ermitteln ob 32 Bit oder 64 Bit Betriebssystem
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:22 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