适用于所有Windows操作系统的应用程序 [英] application for all windows OS

查看:99
本文介绍了适用于所有Windows操作系统的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我对应用程序开发有一些疑问.

我正在VS2010和WIN-XP中编写vc ++ MFC应用程序.在这里,我正在使用WMI,很多与证券相关的API和汇编语言.
真的,我很想知道在WIN98 WIN-XP,WIN2000,VISTA和WIN-XP中运行此应用程序时需要注意的最小事项.

是所有在WIN-XP中工作的API都能在所有更高版本中正常工作.如果Microsoft弃用了更高版本的某些API,该怎么办.

而且我还想知道是否所有32位应用程序都将以64位运行,否则,如何管理这些东西.

如果是这样的话,如何在一个单一的版本中管理所有这些东西,以使其在所有版本的Windows OS中都能正常工作.

我们需要为不同的版本编写不同的API.

我真的很想知道所有这些东西.

事先非常感谢.

HI All,

i have some doubts regarding application development.

i am writing a vc++ MFC application in VS2010 and WIN-XP. here i am using WMI, lotsof securities related APIs and assembly language also.
really i am curious to know what minimal things need to be take care to run this application in WIN98 WIN-XP, WIN2000,VISTA and WIN-XP.

is all the API working in WIN-XP will work fine in all higher versions. what if Microsoft deprecated some APIs in higher version.

and also i would like to know whether all 32 bit application will run in 64 bit or not, if not then how to manage those things.

if so how to manage all those things in a single build to work in all versions of Windows OS.

do we need to write different APIs for different versions.

i really curious to know all those things.

Lots of thanks in advance.

推荐答案

我已经对Win98进行了评论.这是唯一可能存在严重问题的项目.如果您可以将其排除在支持范围之外(我强烈推荐),那很好.

嗯,在Windows API的每个部分上,您都需要查找Microsoft文档并检查兼容平台的列表,就这么简单.您可以将诸如如果Microsoft不推荐使用什么"之类的问题发送给Microsoft.它已经发生了.幸运的是,Microsoft无法淘汰"旧系统上已经在运行的内容,但是您可能需要在运行时检查系统版本,并在运行时选择不同的代码分支.我希望您能纠正可以避免的代码,但是您显然无法预测未来.做好准备.

在任何64位平台上运行32个应用程序都没有问题.所有这些应用程序都在WoW64平台上运行.这是Windows系统的64位版本的子系统,用于运行32位应用程序.请参见 http://en.wikipedia.org/wiki/WOW64 [ http://dependencywalker.com/ [ http://msdn.microsoft.com/en-us/magazine/bb985842.aspx [ http://en.wikipedia.org/wiki/X86-64 [ ^ ])和IA-64( Itanium ),请参见 http://en.wikipedia. org/wiki/Itanium [ ^ ]). Itanium是最初的Intel体系结构,功能更强大,更昂贵,更稀有,x86-64后来在AMD64的压力下创建,并且更流行,更便宜.

优点是:两种64位架构都支持完全相同的32位模式,因此您的所有32位应用程序都可以在OS的任何64位版本上运行,但是您不能将编译为不同64位版本的可执行模块混合使用位目标.

最后,这三个目标平台的组合不能在同一过程中混合使用. IPC是为不同目标编译的组件之间互操作的唯一方法.

这基本上就是您需要了解的所有主题.其他一切都取决于您的开发策略.

祝你好运,
—SA
I already commented on Win98. This is the only item which can be highly problematic. If you could exclude it from support (I highly recommend it), you would be fine.

Well, on every part of Windows API you need to look for Microsoft documentation and check up the list of compatible platforms, as simple as that. Your questions like "what if Microsoft deprecated" can be addressed to Microsoft. It already happens. Fortunately, Microsoft cannot "deprecate" what is already running on a legacy system, but you will probably need to check up the system version during run-time and select different branches of code — during run-time. I wish you could right the code which can avoid it, but you apparently cannot predict the future. Just be prepared.

There is no problem running 32-applications on any of 64-bit platforms. All such application are run on the platform of WoW64. This is a subsystem of 64-bit versions of the Windows systems used for running 32-bit applications. See http://en.wikipedia.org/wiki/WOW64[^].

However, it is not possible to mix executable modules compiled for different platforms (CPU architectures) in one process. One problem is that such application can even be compiled but will crash during run-time. You just need to be careful about it. To avoid trouble, you may need to know all your dependencies. Dependency Walker application can be of great help, see http://dependencywalker.com/[^] and http://msdn.microsoft.com/en-us/magazine/bb985842.aspx[^].

Presently, Windows supports three Intel CPU architectures: 32-bit x86 and two different 64-bit ones: x86-64 (http://en.wikipedia.org/wiki/X86-64[^]) and IA-64 (Itanium, see http://en.wikipedia.org/wiki/Itanium[^]). Itanium is the original Intel architecture, more powerful, expensive and rare, x86-64 was created later under the pressure of AMD64 and is more popular and less expensive.

The good thing is: both 64-bit architectures support perfectly identical 32-bit modes, so all your 32-bit applications will work on any of the 64-bit versions of the OS, but you cannot mix executable modules compiled to different 64-bit targets.

Finally, no combination of these three target platforms can be mixed in the same process. The only way of inter-operation between components compiled for different targets is IPC.

That''s basically all you need to know on this topic. Everything else is up to your development strategy.

Good luck,
—SA


您的操作系统支持应限于XP,Vista,Windows 7,Server 2003-2008.一切都比那更老,都是无关紧要的,而且过时了,以至于沃伦·巴菲特看上去像是一只春鸡.

此外,除非您对创建64位软件有明确的要求,否则请不要理会.如果必须支持32位操作系统,请编写32位软件,并且该软件仍将在64位系统上运行.
Your operating system support should be restricted to XP, Vista, Windows 7, Server 2003-2008. Everything older than those is irrelevant and so obsolete that they make Warren Buffet look like a spring chicken.

Further, unless you have a tangible requirement to create 64-bit software, don''t bother with it. If you must support 32-bit OS''s, write 32-bit software, and it will still run on 64-bit systems.


这篇关于适用于所有Windows操作系统的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆