Ver la Versión Completa : Como saber version de windows (32 o 64 bits) ??
jandok238
16-01-2009, 18:00:46
Buenos dias...
la pregunta es esa, la del titulo de este hilo ...
Como saber el tipo de Windows, si es de 32 o de 64 bits ???...
He dado una busqueda por el foro, pero lo que encontre solo me
da como respuetas el nombre del windows (98, ME, XP y su Service Pack, y Vista) ...
pero si tengo el VISTA 64, no se como hacer que me indique
que tipo de VISTA o XP es de 64 bits ....
Gracias
Salu2!!!!!!!
Hola,
En cierta unidad de la JVCL (http://tyler.excastle.com/browser/trunk/vendor/jcl/common/JclSysInfo.pas) se implementa lo que necesitas, empero, he aislado el siguiente código, de modo que puede usarse la función "IsWindows64" sin más:
const
PROCESSOR_ARCHITECTURE_AMD64 = 9;
{$EXTERNALSYM PROCESSOR_ARCHITECTURE_AMD64}
PROCESSOR_ARCHITECTURE_IA64 = 6;
{$EXTERNALSYM PROCESSOR_ARCHITECTURE_IA64}
function GetNativeSystemInfo(var SystemInfo: TSystemInfo): Boolean;
type
TGetNativeSystemInfo = procedure (var SystemInfo: TSystemInfo) stdcall;
var
LibraryHandle: HMODULE;
_GetNativeSystemInfo: TGetNativeSystemInfo;
begin
Result := False;
LibraryHandle := GetModuleHandle(kernel32);
if LibraryHandle <> 0 then
begin
_GetNativeSystemInfo := GetProcAddress(
LibraryHandle, 'GetNativeSystemInfo');
if Assigned(_GetNativeSystemInfo) then
begin
_GetNativeSystemInfo(SystemInfo);
Result := True;
end
else
GetSystemInfo(SystemInfo);
end
else
GetSystemInfo(SystemInfo);
end;
function IsWindows64: Boolean;
var
ASystemInfo: TSystemInfo;
begin
GetNativeSystemInfo(ASystemInfo);
Result := ASystemInfo.wProcessorArchitecture in
[PROCESSOR_ARCHITECTURE_IA64, PROCESSOR_ARCHITECTURE_AMD64];
end;
A ver si te apaña o qué. ;)
jandok238
19-01-2009, 17:17:22
Gracias DEC ... y pues parece que si trabaja bien ... ;);):D:D
solo que se me estaba pasando agradecerte.... :D:D:D
Gracias....
salu2!!!!!!!
vBulletin v3.6.8, Derechos ©2000-2024, Jelsoft Enterprises Ltd.