摘要: 转载自:http://blogs.msdn.com/mgrier/archive/2005/06/21/431378.aspx 另一篇:http://www.osronline.com/ddkx/ddtools/dv_8pkj.htm The NT DLL Loader: DLL callouts (DllMain) - DLL_PROCESS_ATTACH deadlocks ... 阅读全文
posted @ 2009-07-05 22:02 能巴 阅读(959) 评论(0) 推荐(0)
摘要: 一般在C或C++中(VC当然是C++的一种),DLL的模块入口点有个默认函数,是_DllMainCRTStartup(),它的原形与 DllMain()一样,链接器在链接的时候就是以它作为模块的入口函数,那样它就可以进行一些模块全局变量等的初始化操作,当然用户也可对模块入口地址 进行自行设定,不过不建议这么做!当链接器在链接时,它会自动查找当前DLL模块工程中的各个.obj文件,如果找到有DllM... 阅读全文
posted @ 2009-07-05 20:49 能巴 阅读(3502) 评论(0) 推荐(0)
摘要: 创建纯资源 DLL 纯资源 DLL 是仅包含资源(如图标、位图、字符串和对话框)的 DLL。使用纯资源 DLL 是在多个程序之间共享同一组资源的好方法。提供其资源被针对多种语言进行本地化的应用程序也是一种好方法(请参见 MFC 应用程序中的本地化资源:附属 DLL)。 若要创建纯资源 DLL,请创建一个新的 Win32 DLL(非 MFC)项目,并将资源添加到此项目。 在“新建项目&... 阅读全文
posted @ 2009-07-05 12:40 能巴 阅读(574) 评论(0) 推荐(0)
摘要: AfxGetResourceHandle It returns An HINSTANCE handle where the default resources of the application are loaded. AfxSetResourceHandle Use this function to set the HINSTANCE handle that determines where ... 阅读全文
posted @ 2009-07-05 12:29 能巴 阅读(1473) 评论(0) 推荐(0)
摘要: For AfxLoadLibrary, and serving as the dll search rule: When no path is specified, the function searches for the file in the following sequence: The directory from which the application loaded. The c... 阅读全文
posted @ 2009-07-05 11:45 能巴 阅读(1071) 评论(0) 推荐(0)
摘要: It's so clear that there are three type dlls: regular dll, extension dll and non-MFC dll on windows. Below table from MSDN shows how to initialize it:Typically, your DLL has initialization code (such ... 阅读全文
posted @ 2009-07-05 11:18 能巴 阅读(313) 评论(0) 推荐(0)