[fpc-pascal] Function to know if WIN is 32 or 64

Robert Wolfe wolfe.robwolfe at gmail.com
Wed Mar 16 19:21:05 CET 2011


On 3/16/2011 8:45 AM, Marcos Douglas wrote:
> On Wed, Mar 16, 2011 at 9:21 AM, Juha Manninen
> <juha.manninen62 at gmail.com>  wrote:
>> Marcos Douglas kirjoitti keskiviikko 16 maaliskuu 2011 13:18:41:
>>> On Wed, Mar 16, 2011 at 12:56 AM, Robert Wolfe<wolfe.robwolfe at gmail.com>
>> wrote:
>>>>    WriteLn ;
>>>>    {$IFDEF WIN32}
>>>>        WriteLn ('This is a 32-bit version of Windows.') ;
>>>>    {$ENDIF$}
>>>>    {$IFDEF WIN64}
>>>>        WriteLn ('This is a 64-bit version of Windows.') ;
>>>>    {$ENDIF}
>>>>
>>>> End.
>>>>
>>>> The value returned, however, depends on whether the 32-bit compiler of
>>>> the 64-bit cross-compiler was used.
>>> Interesting. But I think not works on my case. The compiler is 32-bits
>>> but Windows can vary.
>> I was also thinking to suggest the compile time IFDEFs.
>> If the application is compiled for 32-bits then it can behave like a 32-bit
>> application. No need to check anything at runtime.
>>
>> For what do you need the run-time info?
> The problem already been resolved (see the begin of this thread).
> The program was compiled in 32-bits but I have to know what kind of OS
> is running because my program needs to install somethings.
>

So you are writing your own application installer then?



More information about the fpc-pascal mailing list