32/64 bit compatibility issue

There's a 32 bit as well as a 64 bit version of Windows Vista.
Say a program is compiled to the Intel 64 architecture instruction set. Will it run on a 32 bit Vista?
Say a program is compiled to the IA-32 architecture instruction set. Will it run on a 64 bit Vista?
[289 byte] By [_uj] at [2007-11-20 11:43:08]
# 1 Re: 32/64 bit compatibility issue
Well, it seems the answer is no to my first question and yes to the other; an IA-32 program will run on 64 bit Vista (but only if it's on an Intel 64 architecture and not if it's on an IA-64). So in principle you have three different Vistas. You have 32-bit Vista running on IA-32 and then you have 64-bit Vista running on Intel 64 and on IA-64.

If a program is compiled to IA-32 it will run on 32-bit Vista and 64-bit Vista/Intel 64 (but not on 64-bit Vista/IA-64).

So to cover all of Vista you need an IA-32 and an IA-64 version of an application. Although it wouldn't be necessary would there be any special reason to still support an Intel 64 version? On which of the three Vista systems will the program perform the best?
_uj at 2007-11-9 13:32:56 >
# 2 Re: 32/64 bit compatibility issue
I've puzzled over this question myself, and I don't have any really good answers (I, too, hope someone with better information might post in your thread).

What I can answer on the subject is this:

Vista itself isn't all that popular. So far I've found hardly 2% of customers care about Vista compliance, and those that do are usually of the mindset that they have simply found yet another reason not to like their choice of Vista.

Even in that set that choose and for whatever reason prefer Vista over XP, they are predominantly 32bit users. The 64 bit user is rare, and are usually tech savvy by comparison to the general public (though there are a few 'non-tech-savvy' that thought they should go for the 'big version', and regret it). Generally, those that have a 64bit Vista (or XP) that won't run a 32bit application already have that problem with a wide range of 'other' software.

Still, from the standpoint of market coverage, we have to consider future usage patterns. If the 64 bit driver issues are ever resolved then the difference between 32 and 64 bit users will be the application domain only, and they'll want 64 bit builds, so it makes sense to prepare (and generate) both targets. There will never be a one size fits all solution (and never has been except for very short timeframes). All developers should keep an eye on portability, designing a means of indirection for such diverse concepts as OS versions, OS platforms (Linux may yet become important, and is already in certain markets), human languages and display types (ever noticed how your applications look on a wide format display?).

Usually the performance difference between 32 and 64 bit builds is small, but the memory requirements of a 64 bit build are marginally larger, depending on the application design. Obviously there will be a performance gain in 64 bit builds IF the application is built to take advantage of the feature (and the target CAN gain advantage from it).

My personal prediction is that while Vista is currently a dog, a technical flop in many ways, it won't stay that way. SP1 is probably held up because they know they must fix the OS, and I expect an SP2 with even more dramatic alterations that may cause us, as developers, to view Vista as 2 or 3 versions with respect to application design and that long list of 'gotchas' we've discovered. I have no idea how long that might take, but the longer it does take the more customers will either insist on XP, or seriously consider Linux. If only Linux were better prepared to take advantage of this misstep! It is so close, and yet - just not really there, for the desktop general consumer anyway.
JVene at 2007-11-9 13:33:54 >
# 3 Re: 32/64 bit compatibility issue
I've puzzled over this question myself

I've come to the conclusion that the 16/32 bit shift was far more significant than the 32/64 bit shift. The former was almost a revolution for applications whereas the latter is hardly worth mentioning.

Okay some applications will benefit from the wider address space but there cannot be too many of those. It's likely to be the kind of application you buy before the hardware, that is not exactly your mainstream desktop application. The one real advantage of 64-bit Vista I could find is the better kernel sequrity.

I think Vista will replace XP but the transition period may not be fast. Gamers probably will come around first, because they will want DirectX 10 games.

One interesting thing I've noticed is that MS seems to have changed strategy regarding .NET, or at least soften it up. They now acknowledge that not every application benefits that much from it really and that they have their own substantial share of native applications and legacy code.

So it seems classic C++ can look forward to a new spring as a development language for Windows. I wellcome that. -:)
_uj at 2007-11-9 13:35:03 >
# 4 Re: 32/64 bit compatibility issue
What exactly is the kernel?

Thanks,
.pcbrainbuster at 2007-11-9 13:35:56 >
# 5 Re: 32/64 bit compatibility issue
Kernel ( http://www.webopedia.com/TERM/k/kernel.html)

Viggy
MrViggy at 2007-11-9 13:36:55 >
# 6 Re: 32/64 bit compatibility issue
I've come to the conclusion that the 16/32 bit shift was far more significant than the 32/64 bit shift. The former was almost a revolution for applications whereas the latter is hardly worth mentioning.

...

So it seems classic C++ can look forward to a new spring as a development language for Windows. I wellcome that.

Well put!

It seems MS is trying to reposition technologies for web development, and .NET plays a bit part in THAT strategy. I've been working on a website for a friend/client (and I know not to do that - nice to have friendly clients, but friends as clients?) - anyway, it has me thinking about the existing, entrenched decades old web technologies and indeed, THAT mess does need cleaning up. AJAX is a mess. Mixing so many paradigms and languages; it's worse, as a study complexity, than C! (Obviously without the pointer disadvantages).

Your right, though, .NET has virtually no good impact on the customer's experience. From what I can tell, those committed to C# are very satisfied with the language's features. Exposing the operating system as a set of objects is a great idea. I've had some people insist that application development is 1/3 the time.

I pause every time I hear that and think to myself, well, maybe if you've written in C# about as long as you've written in C++, sure. If you're running a staff of hired guns, I can see it. An old hand like myself, though - not so much.

I think any C++ developer who has 'visited' either Java or C# comes away a little better at C++, appreciative of the features those languages provide, which can be (around 90% or better) provided by objects and libraries.

The 'next' C++ sounds like a significant advancement to me (and I don't mean VS2008). The language is about to take a good jump forward in expressive power, and THAT will probably usher in a round of interest.

I see that C# and Java developers like the virtual machine, and the sandbox that plays in. It's just not the kind of target my customer's want, and if I read your post correctly, neither are you.
JVene at 2007-11-9 13:38:04 >
# 7 Re: 32/64 bit compatibility issue
The 'next' C++ sounds like a significant advancement to me (and I don't mean VS2008). The language is about to take a good jump forward in expressive power, and THAT will probably usher in a round of interest.


Yes the next version of C++ will have both threading and garbage collection but unfortunately we'll have to wait until 2010 for that. What's missing then in my view to put C++ on par with Java and C# is a standard GUI.

I've investigated if C++/CLI can be used to write a predominantely classic-native C++ application which uses the CLI extensions to build the GUI using WPF. It works very well and I must say C++/CLI really is an outstanding engineering achievement. And WPF also is a great GUI framework. The problems I've had mainly is in the area of documentation. It's very hard to find C++/CLI example code so there's been a lot of guessing and fumbling in the dark. Also the preferred way to use WPF is by the way of XAML and it's not directly supported by C++/CLI. An open question is the amount of time the application wastes switching context between native and .NET under the hood.

I used C++/CLI because it seemed to be the only available option to use classic-native C++ for Vista application developments. MS pushed .NET hard and native tools have been neglected for years. But this has changed markedly recently. I've watched videos where the Visual C++ team almost hypes native code and new article series are coming up focusing on native code development. It's emphasised that everything you can do with .NET you can also do using a native API, and even MFC is going to get a long overdue overhaul which will enable it for Vista.

It's appearant that Visual C++ is re-focusing on native code development. The purpose of C++/CLI is to make interop between native and .NET smooth. It does no longer represent the idea that everything native is to become .NET eventually. To me this is a clear strategy shift.

So basically I'm back to square one. I don't have to use C++/CLI. I confidently can stick to plain good old classic C++ without a trace of .NET and that's probably what I'm going to do. (knowing that I'll have to put in a hell of a lot more gruntwork :))

The question now becomes whether to use MFC or the Win32 API directly for the GUI. I think I will try the latter starting from this thin and simple abstraction layer called win32++,

http://www.codeproject.com/win32/framework.asp

Any experience using it anyone?
_uj at 2007-11-9 13:39:07 >
# 8 Re: 32/64 bit compatibility issue
I see that C# and Java developers like the virtual machine, and the sandbox that plays in. It's just not the kind of target my customer's want, and if I read your post correctly, neither are you.

I went from C to Java and then to C++. Java was a good introduction to OO concepts which I now apply to C++. And the Java experience also made it very easy to understand the CLI extensions in C++/CLI.

I'm a long time user of Java and it works very well (at least since version 5) for many applications. But it's not that. I'm increasingly convinced C++ is a much sounder language than both Java and C#. I'm sure C++ will regain lost territory over the coming years, especially when it too gets built-in multi-threading and garbage collection. Right now the lack is a drawback.

I can understand that MS must meet the Java challange, and it has done so with .NET. What I cannot understand is why .NET has to root out everything native. If there's a company with a highly educated and experienced work force of C++ programmers churning out excellent native applications for Windows how on earth could it become in MSs interest to prevent them from continuing by slapping them in the face saying no, no, no you got to use .NET to be wellcome on Windows?

Fortunately MS seems to have come to their senses by letting Visual C++ go more native, and even Sun has started to play down Java a notch. They're no longer hiding the fact that they sport a C++ compiler for Solaris and that they won't shoot you if you use it. So maybe we're experiencing the peak of the managed code fad right now and that it will decline from here on. :)
_uj at 2007-11-9 13:39:59 >