Is there some function to know if the Windows is 32 or 64?
Marcos Douglas
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 15 March 2011 14:05, Marcos Douglas 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.
Henry
_
On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak wrote:
>
> On 15 March 2011 14:05, Marcos Douglas 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
>
On 15 March 2011 14:25, Marcos Douglas wrote:
> On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak
> wrote:
>>
>> On 15 March 2011 14:05, Marcos Douglas wrote:
>> > Is there some function to know if the Windows is 32 or 64?
>>
>> You can use the GetNativeSystemInfo function. Check
>> TSystemInfo.
I've used this in Delphi 32 and it seems to work. Forgot where I
pulled the basic info. Probably doesn't do much on native 64 bit.
function Is64BitOS: Boolean;
type
TIsWow64Process = function(Handle:THandle; var IsWow64 : BOOL) :
BOOL; stdcall;
var
hKernel32 : Integer;
IsWow64Process : TIs
On Tue, Mar 15, 2011 at 11:35 AM, Henry Vermaak wrote:
> On 15 March 2011 14:25, Marcos Douglas wrote:
>> On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak
>> wrote:
>>>
>>> On 15 March 2011 14:05, Marcos Douglas wrote:
>>> > Is there some function to know if the Windows is 32 or 64?
>>>
>>> You
Am 15.03.2011 16:00, schrieb Marcos Douglas:
On Tue, Mar 15, 2011 at 11:35 AM, Henry Vermaak wrote:
On 15 March 2011 14:25, Marcos Douglas wrote:
On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak wrote:
On 15 March 2011 14:05, Marcos Douglas wrote:
Is there some function to know if the Win
On 15 March 2011 15:00, Marcos Douglas wrote:
>
> Weird. This code did not compile in this line:
> @GNSIProc := GetProcAddress(GetModuleHandle('kernel32.dll'),
> 'GetNativeSystemInfo');
>
> Error: unit1.pas(46,2) Error: Can't assign values to an address
This was Delphi code, so remove the @.
He
On Tue, Mar 15, 2011 at 12:05 PM, Sven Barth
wrote:
>> Weird. This code did not compile in this line:
>> @GNSIProc := GetProcAddress(GetModuleHandle('kernel32.dll'),
>> 'GetNativeSystemInfo');
>>
>> Error: unit1.pas(46,2) Error: Can't assign values to an address
>>
>>
>
> Just a guess:
> Add {$mo
On 15 March 2011 15:19, Marcos Douglas wrote:
>
> Right. But is better ignore the IA64?
You can do whatever you like. We chose to ignore it, since we don't
support it. You just have to check for the
PROCESSOR_ARCHITECTURE_IA64, too, if you'd like to support it. See
the msdn page:
http://msdn.
On Tue, Mar 15, 2011 at 12:36 PM, Henry Vermaak wrote:
> On 15 March 2011 15:19, Marcos Douglas wrote:
>>
>> Right. But is better ignore the IA64?
>
> You can do whatever you like. We chose to ignore it, since we don't
> support it. You just have to check for the
> PROCESSOR_ARCHITECTURE_IA64,
On Tue, Mar 15, 2011 at 11:47 AM, DaWorm wrote:
> I've used this in Delphi 32 and it seems to work. Forgot where I
> pulled the basic info. Probably doesn't do much on native 64 bit.
>
> function Is64BitOS: Boolean;
> type
> TIsWow64Process = function(Handle:THandle; var IsWow64 : BOOL) :
> BOO
In our previous episode, Marcos Douglas said:
> > ? ?if (IsWow64Process(GetCurrentProcess, IsWow64)) then
> > ? ? Result := IsWow64
> > ? end;
> > ?FreeLibrary(hKernel32);
> > end;
>
> Thanks Jeff, this also works and seems to be standard function to know
> if is a 32 or 64bits
> See http://msdn.m
On Tue, Mar 15, 2011 at 12:48 PM, Marco van de Voort wrote:
> In our previous episode, Marcos Douglas said:
>> > ? ?if (IsWow64Process(GetCurrentProcess, IsWow64)) then
>> > ? ? Result := IsWow64
>> > ? end;
>> > ?FreeLibrary(hKernel32);
>> > end;
>>
>> Thanks Jeff, this also works and seems to be
On 15 March 2011 15:46, Marcos Douglas wrote:
>
> Thanks Jeff, this also works and seems to be standard function to know
> if is a 32 or 64bits
No, this won't work if your application is compiled for win64 (since
it won't run under the emulator), as Jeff mentioned.
Henry
On Tue, Mar 15, 2011 at 1:33 PM, Henry Vermaak wrote:
> On 15 March 2011 15:46, Marcos Douglas wrote:
>>
>> Thanks Jeff, this also works and seems to be standard function to know
>> if is a 32 or 64bits
>
> No, this won't work if your application is compiled for win64 (since
> it won't run under
On Tue, Mar 15, 2011 at 1:40 PM, Marcos Douglas wrote:
> On Tue, Mar 15, 2011 at 1:33 PM, Henry Vermaak
> wrote:
>> On 15 March 2011 15:46, Marcos Douglas wrote:
>>>
>>> Thanks Jeff, this also works and seems to be standard function to know
>>> if is a 32 or 64bits
>>
>> No, this won't work if
On 3/15/2011 10:25 AM, Marcos Douglas wrote:
On Tue, Mar 15, 2011 at 11:13 AM, Henry Vermaak wrote:
On 15 March 2011 14:05, Marcos Douglas wrote:
Is there some function to know if the Windows is 32 or 64?
You can use the GetNativeSystemInfo function. Check
TSystemInfo.wProcessorArchitecture
18 matches
Mail list logo