Windef.h // 基本数据类型的定义
WindNt.h // 支持Unicode的类型定义
Winbase.h // 内核函数
WinUser.h // 用户界面接口
WinGdi.h // 图形设备接口函数
Windows程序 用户入口WinMain函数在WinBase中如下定义:
1 #ifndef _MAC 2 int 3 WINAPI 4 #else 5 int 6 CALLBACK 7 #endif 8 WinMain( 9 HINSTANCE hInstance, 10 HINSTANCE hPrevInstance, 11 LPSTR lpCmdLine, 12 int nShowCmd 13 );
而WINAPI又在Windef中如下定义:
#define WINAPI __stdcall
这种语句定义了函数的调用约定,说简单点也就是按照__stdcall的调用约定生成存放参数的机器代码,指定了谁清理参数空间。决大部分API函数都是这个调用约定。