how to detect OS architecture?

Marco Leise Marco.Leise at gmx.de
Mon Dec 16 08:46:27 PST 2013


Am Mon, 16 Dec 2013 16:04:07 +0100
schrieb Jacob Carlborg <doob at me.com>:

> On 2013-12-16 11:53, Hugo Florentino wrote:
> > Hi,
> >
> > I am writing a launcher to make a Windows application portable, but
> > since this application supports both x86 and x86_64, I would like to
> > detect the architecture of the OS my launcher is being run on, in order
> > to launch the proper executable.
> 
> The easiest would be: if you launcher is built for 64bit, pick the 64bit 
> application, otherwise pick the 32bit application.
 
Hehe, I guess the whole purpose of the launcher is to run in
32-bit and detect at runtime if the 64-bit main executable can
be run or the 32-bit version must be used.

-- 
Marco



More information about the Digitalmars-d-learn mailing list