电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

C++Builder建立及调用DLL

C++Builder建立及调用DLL_第1页
1/7
C++Builder建立及调用DLL_第2页
2/7
C++Builder建立及调用DLL_第3页
3/7
C++Builder 建立及调用DLL DLL 简称动态链接库,是Windows 中程序的重要组成部分。想象一下,一个程序需要多人共同完成开发,怎么个共同法?这时我们就要考虑把程 序分为好几个模块,团队每一个成员开发一个模块。问题来了:如何将模块组合并成一个完整系统?还有,我们开发的软件需要不断升级,如 何升级?难道每次非得把整个工程重新编译一次再发布给用户吗?解决这些问题的科学办法,就是开发动态链接库DLL。 现在以开发myDLL.dll动态链接库为例,讲讲BCB 中开发动态链接库的方法。 1、新建立一个工程:File-New-Other...在New 卡中选择 DLL Wizard 2、将工程存为myDLL.bpr 3、在myDLL.cpp中写接口代码: ////--------------------------------------------------------------------------- #include #include #pragma hdrstop ////--------------------------------------------------------------------------- //// Important note about DLL memory management when your DLL uses the //// static version of the RunTime Library: //// //// If your DLL exports any functions that pass String objects (or structs/ //// classes containing nested Strings) as parameter or function results, //// you will need to add the library MEMMGR.LIB to both the DLL project and //// any other projects that use the DLL. You will also need to use MEMMGR.LIB //// if any other projects which use the DLL will be performing new or delete //// operations on any non-TObject-derived classes which are exported from the //// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling //// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, //// the file BORLNDMM.DLL should be deployed along with your DLL. //// //// To avoid using BORLNDMM.DLL, pass string information using "char *" or //// ShortString parameters. //// //// If your DLL uses the dynamic version of the RTL, you do not need to //// explicitly add MEMMGR.L...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

C++Builder建立及调用DLL

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部