开发者

starting 64 Bit Windows Application Development

开发者 https://www.devze.com 2022-12-13 21:18 出处:网络
I intend to start writing a 64 Bit Scientific Computing Application (signal processing) 开发者_如何学编程for Windows using Microsoft Visual Studio 2008.

I intend to start writing a 64 Bit Scientific Computing Application (signal processing) 开发者_如何学编程for Windows using Microsoft Visual Studio 2008. What should I have ready as far as a development platform is concerned?

How would it be different from 32 Bit development? What could be the porting issues for a 32 Bit version that I already have (ok - this might too early to ask.. even before I start compiling)?

As you might have guessed, I am looking for general directions. All pointers would be much appreciated! :)

Thanks in advance..


When installing Visual Studio 2008, pay attention to tick the box that installs 64bit compiler and tools as it's not by default.

Then you can refer to these articles for guides on 32 to 64bit migration:

  • Converting 32-bit Applications Into 64-bit Applications: Things to Consider
  • Introduction to 64-Bit Transition Guide


The development in 32 bit and 64 bit is the same, as far as the managed code (.NET) development is concerned, as long as you compile your code usign ANY CPU option. So all your code developed on your machine will run just fine on both 32 bit and 64 bit platform.

If you are doing native C++ development, then you might have to compile according to specific platform and compile twice ( one in x86 and another in x64).


The most important difference is size of pointer. On 32bit its 32 bit and on 64 its 64bit. int and long remain same.


First you have to know that windows 64 bit can run both 64 bit and 32 bit in emulation mode WOW64 so you'll have to decide if you want to allow that or you are interested only in 'pure' 64 bit.
Assuming you want to run in both modes you should take the following points into account:

  1. If your application uses the registry you have to consider that few keys like HKLM has two entries. For example HKEY_LOCAL_MACHINE\SOFTWARE for 64 bit programs and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node for 32 bit programs. Similar to that if your application uses the System32 folder you'll now have to deal with two folders: System32 for 64 bit and SysWOW64 for 32 bit.

  2. If you are using manage code you should choose how to build the application. If its doing interop calls into unmanaged code than you need to build it twice: one with the platform set to x64 and one with the platform set x86. If you don't have calls to unmanaged code than you can build it as AnyCPU platform.

  3. And obviously more memory (every pointer takes 8 bytes instead of 4 bytes)


All the answers to this question will help you.

Windows development: x86 to x64 transition

0

精彩评论

暂无评论...
验证码 换一张
取 消