Possible en double:
How to detect Windows 64 bit platform with .net?travail sur la version de Windows
Comment savez-vous si le système d'exploitation est x64 ou x86 de Windows C# .net 2.0 applicaiton?
L'application est également 32bit.
Merci
Possible en double:
How to detect Windows 64 bit platform with .net?travail sur la version de Windows
Comment savez-vous si le système d'exploitation est x64 ou x86 de Windows C# .net 2.0 applicaiton?
L'application est également 32bit.
Merci
Utilisez GetEnvironmentVariable
à rechercher la variable PROCESSOR_ARCHITEW6432
. Si elle n'existe pas, vous devez exécuter 32bit:
bool is64bit = !string.IsNullOrEmpty(
Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"));
EDIT:
Merci à Hans Passant pour souligner l'erreur en utilisant la variable PROCESSOR_ARCHITECTURE
.
Avez-vous réellement essayé cela? Wow64 n'est pas si facilement vaincu, l'émulation couvre tous les coins. Sauf IsWow64Process et GetNativeSystemInfo. –
@Hans Passant - Copié à partir d'un système de production. Devrais-je m'inquiéter? – GenericTypeTea
Allez-y, vous inquiétez pas. –
http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-net – dmitko