MFC dll与托管C ++ dll [英] MFC dll vs Managed C++ dll

查看:87
本文介绍了MFC dll与托管C ++ dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(关于在Studio 2008中构建的项目)


告诉我在/clr选项下构建的MFC dll与托管C ++之间的区别
具有相同代码段的DLL ??:confused :: confused:

( With respect to projects build in studio 2008 )


Tell me difference between MFC dll built under /clr option and Managed C++
Dll with same piece of code ??:confused::confused:

推荐答案

具有/clr的MFC dll可以同时包含MFC之类的非托管代码和C ++之类的托管代码. NET允许您使用MFC和.NET

完全托管的C ++ dll意味着仅将托管代码与.NET一起使用

非托管代码-程序员可用于分配和释放内存,例如使用new和delete

托管代码-使用垃圾回收自动管理内存

混合的/clr兼有
An MFC dll with /clr can contain both unmanged code like MFC and managed code like C++.NET allowing you to use MFC and .NET

A purly managed C++ dll implies using only managed code with .NET

Unmanaged code - the programmer is resposible for allowcation and deallocation of memory e.g. using new and delete

Managed code - automatically manage memory using garbage collections

Mixed /clr has both


这篇关于MFC dll与托管C ++ dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆