是否有任何与Windows交互的程序/语言/库通过WIN32 API来完成? [英] Does any program/language/library that interacts with windows do it via the WIN32 API?

查看:120
本文介绍了是否有任何与Windows交互的程序/语言/库通过WIN32 API来完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我熟悉WinForms和MFC,它们都是基于WIN32 API构建的.因此,实际上在这两者中的任何一个中,当您在后台调用Button时,框架都会调用多个API函数来完成工作.

I am familiar with WinForms and MFC which are both built on top of the WIN32 API. So really in either of those two, when you call for a Button in the background that framework calls multiple API functions to get the work done.

所以我的问题是,所有其他库是否都通过WIN32 API与Windows交互?

So my question is, do all other libraries interact with windows via the WIN32 API?

我能想到的唯一另一个是WPF(也许Qt?Idk根本就是Qt),我对其他任何事物都不熟悉.

The only other one I can think of is WPF (Maybe Qt? Idk what Qt is at all), I am not familiar with anything else.

推荐答案

Windows API是Windows的公共编程接口,Windows上运行的任何(桌面)应用程序最终都将调用Windows API来完成工作.这是通过不同的抽象级别来实现的:

The Windows API is the public programming interface for Windows, and any (desktop) application running on Windows will eventually call into the Windows API to get things done. This is accomplished through different levels of abstraction:

  • 用C语言编写的访问Windows API的应用程序,如果没有CRT支持,将直接使用通过Windows API提供的服务.
  • 使用CRT用C或C ++编写的应用程序将混合使用直接调用Windows API和使用CRT的抽象的方法.例如,使用mallocnew的内存分配将由CRT映射到Windows API调用.
  • 使用C ++框架(例如MFC,Qt或WTL)的应用程序仍可以直接调用Windows API,但通常会使用框架提供的服务.该框架提供的服务最终将调用Windows API.
  • 编译为公共中间语言(CIL)的
  • .NET应用程序将由公共语言运行时(CLR)编译为本机代码. CLR提供的服务是在Windows API之上实现的.
  • 诸如VBScript之类的脚本语言是由执行环境(例如,用于VBScript的Windows脚本宿主)执行的.该执行环境也是在Windows API之上实现的.
  • An application written in C accessing the Windows API, without CRT support will directly use the services provided through the Windows API.
  • An application written in C or C++ using the CRT will use a mix of directly calling into the Windows API and using the CRT's abstraction. For example, memory allocations using malloc or new will be mapped to Windows API calls by the CRT.
  • Applications using a C++ framework like MFC, Qt, or WTL can still call the Windows API directly, but will usually use the services provided by the framework. The services provided by the framework will eventually call into the Windows API.
  • .NET applications compiled to Common Intermediate Language (CIL) will be compiled to native code by the Common Language Runtime (CLR). The services provided by the CLR are implemented on top of the Windows API.
  • Scripting languages like VBScript are executed by an execution environment (e.g. the Windows Scripting Host for VBScript). This execution environment is implemented on top of the Windows API as well.

我能想到的唯一例外是WinRT. WinRT的某些部分通过Windows API使用现有的Windows服务.其他部分从上到下都是全新的,并且可以直接与内核交互.

The only exception I could think of is WinRT. Some parts of WinRT use existing Windows services by means of the Windows API. Other parts are completely new from top to bottom, and directly interact with the kernel.

还可以避开Windows API并通过本地API直接与内核进行交互.但是,此文件尚未公开记录,也不是正式的编程接口.

There is also the possibility to sidestep the Windows API and directly interact with the kernel through the Native API. This, however, is not publicly documented, and not an official programming interface.

这篇关于是否有任何与Windows交互的程序/语言/库通过WIN32 API来完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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