In my latest experiment, in the project properties where some preprocessor
identifiers are defined, MSDN says that identifier WIN32 is replaced by
identifier WIN64 automatically, but Visual Studio 2005 does not do so.
In my latest experiments, in the project properties for C++, I kept the
setting of WIN32 and added additional definitions of both WIN64 and _WIN64.
_WIN64 affects some include files so that some datatypes will be correct for
64-bit execution. I don't know if it's necessary to keep WIN32 defined
and/or define WIN64 the same way, but so far they haven't caused any visible
problems.
In my latest experiments, in the project properties for MIDL, I didn't add
definitions of WIN64 and _WIN64. As far as I can tell, this omission causes
Visual Studio 2005 to display inappropriate portions of some MIDL include
files, but MIDL compilation seems to be correct for 64-bit execution. As
far as I can tell, this is because Visual Studio 2005 automatically added a
different MIDL compilation option, which isn't documented in MSDN but which
seems to work halfway.
The problem with the C# client trying to retrieve IntPtr values (working in
32-bits but failing to compile in 64-bits) has remained unchanged in all of
these experiments.