From: rogFed28685 on
Hi all,
I am trying to convert my 32 bit application in C++ to a 64 bit
compatible platform on Visual Studio 2005.

I was wondering if you could guide me in this matter. I know that we
have to change variables etc appropritely and compile it in x64 mode.

If I am working on a 32-bit machine how do i test and basically run
the 64bit version on my machine? IS it possible to do so? ( running
the 64 bit converted code on a 32bit machine...)

Im using macros to make it compatible in x64.

Any guidance is really appreciated .... Thank you all for taking the
time to help me!
From: Joseph M. Newcomer on
The /Wp64 option will give you a good "first cut" at problems. It isn't perfect, but it
finds the most egregious ones.

One of the greatest problems is that Microsoft changed a whole bunch of calls in both MFC
and the raw API to return INT_PTR, UINT_PTR or DWORD_PTR values, and some accept these
values. Anything that was LRESULT or LPARAM is already 64-bit aware. But OTHER calls did
NOT get changed to take 64-bit values; for example ReadFile and WriteFIle should ALWAYS
have be specified in terms of a SIZE_T length, but instead the poor choice of DWORD was
made, and the API did NOT change with the release of Win64, so you cannot write out more
than 4.2GB of data in a single WriteFile call. This wouldn't be so bad, but often the
calls that give you the length of the buffer are returning 64-bit values, and you have to
truncate them with casts to get the 32-bit value, a truly ugly and potentially error-prone
action.

And no, to the best of my knowledge, it is impossible to run 64-bit code on a 32-bit
machine in anything like reasonable time; I'm sure someone has written an emulator that
will do this, but hundreds to thousands of times slower than a native machine would be my
best guess.

I stopped buying 32-bit machines over a year ago, except for my laptop, whose form-factor
(the compelling parameter) does not exist in a 64-bit version.

I've converted several apps to 64-bit, and most of my problems deal with the failure of
Microsoft to change any number of library functions in various libraries or in the API
from "int" lengths (and negative lengths never made sense anyway!) to size_t lengths, as
they always should have been.
joe

On Sun, 27 Apr 2008 09:09:27 -0700 (PDT), "rogFed28685(a)gmail.com" <rogFed28685(a)gmail.com>
wrote:

>Hi all,
>I am trying to convert my 32 bit application in C++ to a 64 bit
>compatible platform on Visual Studio 2005.
>
>I was wondering if you could guide me in this matter. I know that we
>have to change variables etc appropritely and compile it in x64 mode.
>
>If I am working on a 32-bit machine how do i test and basically run
>the 64bit version on my machine? IS it possible to do so? ( running
>the 64 bit converted code on a 32bit machine...)
>
>Im using macros to make it compatible in x64.
>
>Any guidance is really appreciated .... Thank you all for taking the
>time to help me!
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Ian Semmel on
They also changed time_t to a 64-bit value. In itself OK, but if you are
doing things like writing a time_t to an archive, you can have problems
reading old archives.

I would have preferred a time64_t or something.

There is a macro definition _USE_32BIT_TIME_T


"rogFed28685(a)gmail.com" <rogFed28685(a)gmail.com> wrote in message
news:82e1eb1f-d50f-4936-8375-11e3726df0ab(a)a70g2000hsh.googlegroups.com:

> Hi all,
> I am trying to convert my 32 bit application in C++ to a 64 bit
> compatible platform on Visual Studio 2005.
>
> I was wondering if you could guide me in this matter. I know that we
> have to change variables etc appropritely and compile it in x64 mode.
>
> If I am working on a 32-bit machine how do i test and basically run
> the 64bit version on my machine? IS it possible to do so? ( running
> the 64 bit converted code on a 32bit machine...)
>
> Im using macros to make it compatible in x64.
>
> Any guidance is really appreciated .... Thank you all for taking the
> time to help me!

From: rogFed28685 on
On Apr 27, 11:42 pm, "Ian Semmel" <any...(a)rocketcomp.com.au> wrote:
> They also changed time_t to a 64-bit value. In itself OK, but if you are
> doing things like writing a time_t to an archive, you can have problems
> reading old archives.
>
> I would have preferred a time64_t or something.
>
> There is a macro definition _USE_32BIT_TIME_T
>
> "rogFed28...(a)gmail.com" <rogFed28...(a)gmail.com> wrote in message
>
> news:82e1eb1f-d50f-4936-8375-11e3726df0ab(a)a70g2000hsh.googlegroups.com:
>
> > Hi all,
> > I am trying to convert my 32 bit application in C++ to a 64 bit
> > compatible platform on Visual Studio 2005.
>
> > I was wondering if you could guide me in this matter. I know that we
> > have to change variables etc appropritely and compile it in x64 mode.
>
> > If I am working on a 32-bit machine how do i test and basically run
> > the 64bit version on my machine? IS it possible to do so? ( running
> > the 64 bit converted code on a 32bit machine...)
>
> > Im using macros to make it compatible in x64.
>
> > Any guidance is really appreciated .... Thank you all for taking the
> > time to help me!

Hi guys,

Thanks a lot for the info..! I really appreciate it....at least I have
a starting point now...