精通win32 api编程-windows图形界面编程_windows程序设计基础(第二章)—— 2.3 Windows API简介...

dbb48bbf7ad2eebb7b19423a4d82b66d.png

API(Application ProgrammingInterface,应用程序编程接口),是操作系统提供给开发者的应用程序编程接口。用户使用该接口可以调动操作系统资源,而又无需访问源码,或理解内部工作机制的细节,从而实现自己的应用程序的功能。

简单理解,API即为函数,是由操作系统提供,开发者不需要知道函数的具体实现方法,只要了解其功能及使用方法即可。由于API是操作系统提供,所以它有一个特性,即编译环境的无关性,如果使用VB、Delphi等期编译环境,也可以同样调用相同的API功能,唯一不同的是各种编程语言上语法的不同。

API在计算机系统中的位置如图2.3所示。

4f0e0579e9849aba4f91cd4bbdc3f717.png
图2.1 API用户接口

事实上,Windows API是在安装完操作系统之后,就已经存在了,它是以DLL文件的形式存在,存在“C:WINDOWSsystem32”下,在这个目录下可以看到很多很多的DLL文件,而这些文件就是提供函数接口的地方。DLL文件的操作与说明会在后面的章节介绍,这里就不过多说明。常用的Win32函数库所需要的DLL文件如下:

GDI32.DLL:屏幕显示及打印功能的函数集;

USER32.DLL:鼠标、键盘、通信端口、声音、时钟功能的函数集;

KERNEL32.DLL:文件及内存管理(核心部分)功能的函数集;

MPR.DLL:Windows32网络接口库;

ADVAPI32.DLL:Windows32、ADVAPI32核心部件。

类库和控件都是构架在Windows API函数基础之上的,是封装了的API函数的集合。它们把常用的API函数的组合在一起成为一个控件或类库,并赋予其方便的使用方法,所以极大的加速了WIN32应用程序开发的过程。有了这些控件和类库,程序员便可以把主要精力放在程序整体功能的设计上,而不必过于关注技术细节。

2882a1fe52c49e43fe1821b86d1653d3.png
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Forger 推荐的学习windows 编程的所有书籍都在这儿: windows 编程 windows MFC入门到精通 windows 高级编程 windows 网络编程 Programming Windows Programming Windows with MFC Programming Applications for Windows Network Programming for Microsoft Windows Programming Windows by Charles Petzold. The book to get on Win32 API. If you want to write programs using just the API (which is what this tutorial covers), you need this book. 如果你想只用windows API编程,这本书是入门经典,你需要这本书。 Programming Windows with MFC by Jeff Prosise. If you want to venture into MFC (AFTER becoming fully accustomed to using the Win32 API), this is the book for you. If you don't like MFC but intend on getting a job doing windows developement, get this anyway, it's better to know than not. 如果你想用MFC这本书是你想要的 Programming Applications for Windows by Jeffrey Richter. Not for newbies, if you want to be up on managing processes and threads, dlls, windows memory management, exception handling, and hooking into the system, then this is the book for you. 如果你想了解操作系统内幕,这本书是经典,书中包含了进程,线程,动态库,windows内存管理,异常处理。。。 Visual C++ Windows Shell Programming by Dino Esposito. For anyone interested in the visual and user-friendly aspects of windows, this book covers writing extentions to the windows shell, working efficiently with files and drag and drop, customizing the taskbar and windows explorer, and numerous other tricks. Well worthwhile for anyone writing GUI apps in windows. Network Programming for Microsoft Windows Up to date information on network programming, including NetBIOS, mailslots and pipes, and of course the ever important windows sockets, complete with winsock2 and raw sockets. Also contains specific information on the various windows platforms including 2000 and CE.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值