64Bit Windows erkennen?
-
vielleicht. schrieb:
IsWow64Process
Hatte ich schon, aber wenn man das liest, geht das nicht, oder?
Example Code [C++]
For compatibility with operating systems that do not support this function, call GetProcAddress to detect whether IsWow64Process is implemented in Kernel32.dll. If GetProcAddress succeeds, it is safe to call this function. Otherwise, WOW64 is not present. Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows because the Kernel32.dll in current versions of 32-bit Windows also contains this function.Quelle: http://msdn2.microsoft.com/en-us/library/ms684139.aspx
-
IMHO gibt es nix 'verlässlicheres' ...
-
trequ schrieb:
vielleicht. schrieb:
IsWow64Process
Hatte ich schon, aber wenn man das liest, geht das nicht, oder?
Example Code [C++]
For compatibility with operating systems that do not support this function, call GetProcAddress to detect whether IsWow64Process is implemented in Kernel32.dll. If GetProcAddress succeeds, it is safe to call this function. Otherwise, WOW64 is not present. Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows because the Kernel32.dll in current versions of 32-bit Windows also contains this function.Quelle: http://msdn2.microsoft.com/en-us/library/ms684139.aspx
Jajaja aaabber
Bezieht sich dieses
Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows
nicht *nur* auf das Prüfen ob die Funktion vorhanden ist über GetProcAddress?! Wenn GetProcAddress erfolgreich ist, muss man noch IsWow64Process aufrufen und diese Funktion müsste einem doch dann sicher sagen können ob man sich jetzt auf einem 64-/oder 32-Bit Windows befindet???
Im Beispielcode ist es ja eigentlich auch so geregelt...
-
Nop, das denke ich nicht, da die Funktion ja auch in der Kerne32.dll auf 32-Bit Plattformen aus Kompatibilitätsgründen implementiert ist. (Was sie dann aber tut...man wees et nit
) .
Vielleicht weiß Jochen das ja (er könnte es theoretisch ja auch nachgucken)
.
-
Ich hab gesehen, das einige wohl GetSystemInfo() nehmen und .wProcessorArchitecture prüfen...
-
geeky schrieb:
Ich hab gesehen, das einige wohl GetSystemInfo() nehmen und .wProcessorArchitecture prüfen...
Hm jo aber er wollte ja die Software-Seite prüfen, dachte auch erst an GetNativeSystemInfo/GetSystemInfo, aber das geht ja Richtung Hardware...
-
Fragen wir mal so: Warum willst Du es überhaupt wissen???
Wenn Du Dein Programm als x64 übersetzt hast und es sich ausführen lässt, dann kannst Du davon ausgehen, dass es ein x64 OS ist (sonst würde es sich ja nicht ausführen lassen).Und wenn Du ein x86 Programm hast, warum willst Du es dann wissen? Aber wenn es die Funktion "IsWow64Process" gibt und diese TRUE liefert, dann ist es ein 64-Bit OS (entweder x64 oder IA64).
-
CodeFinder schrieb:
Nop, das denke ich nicht, da die Funktion ja auch in der Kerne32.dll auf 32-Bit Plattformen aus Kompatibilitätsgründen implementiert ist.
Ist sie bisher zumindest noch nicht. Aber was nicht ist kann ja noch kommen...
-
Jochen Kalmbach schrieb:
CodeFinder schrieb:
Nop, das denke ich nicht, da die Funktion ja auch in der Kerne32.dll auf 32-Bit Plattformen aus Kompatibilitätsgründen implementiert ist.
Ist sie bisher zumindest noch nicht. Aber was nicht ist kann ja noch kommen...
Huh, sicher ?... Steht hier
:
For compatibility with operating systems that do not support this function, call GetProcAddress to detect whether IsWow64Process is implemented in Kernel32.dll. If GetProcAddress succeeds, it is safe to call this function. Otherwise, WOW64 is not present. Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows because the Kernel32.dll in current versions of 32-bit Windows also contains this function.
PS: Was macht n mein Packet
?
-
[quote="CodeFinder"]
Jochen Kalmbach schrieb:
CodeFinder schrieb:
Nop, das denke ich nicht, da die Funktion ja auch in der Kerne32.dll auf 32-Bit Plattformen aus Kompatibilitätsgründen implementiert ist.
Ist sie bisher zumindest noch nicht. Aber was nicht ist kann ja noch kommen...
Huh, sicher ?... Steht hier
:
Ich muss doch mal Vista installieren... vielleicht haben sie es ja da hinzugefügt...CodeFinder schrieb:
PS: Was macht n mein Packet
?
Ich frag mal nach
-
@Jochen:
Thank You Very Much!