动态库学习积累

来源:互联网 发布:用友erp 软件界面 编辑:程序博客网 时间:2024/05/22 00:12

1.建立win32DLL。

若选择 An empty DLL project ,则向导不生成任何文件

若选择 An simple DLL project ,则向导stdafx.h stdafx.cpp文件(stdafx并不是MFC专用的)

2.win32的 DLLMain 会被声明为  APIENTRY

3.MFC类型的动态库,建立时选项Regular dll with mfc statically linked,意思并不是说本动态库被使用的时候被静态链接。而是说这个动态库,它在使用MFC的时候,静态链接MFC。A regular DLL statically linked to MFC is a DLL that uses MFC internally, and the exported functions in the DLL can be called by either MFC or non-MFC executables.

4.并不是说只有引出函数才用_stdcall,只要是在com中的函数就应该声明为_stdcall

5.无论是建立win32 DLL 还是 MFC DLL,如果向导中选择 simple..,则会自动生成stdafx预编译文件以及main函数

原创粉丝点击