[fpc-pascal] Function to know if WIN is 32 or 64
Marcos Douglas
md at delfire.net
Tue Mar 15 15:25:26 CET 2011
On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak <henry.vermaak at gmail.com> wrote:
>
> On 15 March 2011 14:05, Marcos Douglas <md at delfire.net> wrote:
> > Is there some function to know if the Windows is 32 or 64?
>
> You can use the GetNativeSystemInfo function. Check
> TSystemInfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_AMD64 to
> see if it's 64 bit.
What unit?
I've used this function in Delphi (7) and didn't work:
function is64bitOS: boolean;
var
SysInfo: TSystemInfo;
begin
GetSystemInfo(SysInfo);
Result := (
(Sysinfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_AMD64)
or (Sysinfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_IA64)
);
end;
Marcos Douglas
More information about the fpc-pascal
mailing list