哪个dll需要在vc ++中注册? [英] Which dll is required registration in vc++?

查看:98
本文介绍了哪个dll需要在vc ++中注册?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



为什么DLL需要注册?哪个dll需要在vc ++和其他语言中注册?为什么我们在vc ++中使用了三种类型的dll,即常规,扩展和非mfc?

请解释一下。

Hello Friends,

Why DLLs need registration? Which of the dll need registration in vc++ and other languages? Why we used three types of dll in vc++ i.e. regular, extension and non-mfc?
Please explain these.

推荐答案

实际上有更多''类型'的DLL比你在这里列出的更多,但对于这些,区别主要是它们的链接。



如果DLL有一个COM / DCOM / COM +接口需要注册才能完全有用。



[小谎言]如果DLL包含托管代码,则称为程序集,并且处理方式不同同样。
There are actually more ''types'' of DLLs than you have listed here but for these, the difference is largely what they are linked to.

If a DLL has a COM/DCOM/COM+ interface it needs to be registered to be fully useful.

[small lie] If a DLL contains managed code, it is called an assembly and is treated differently as well.


你的问题导致了一些复杂的话题,但我想我可以把它分解成一些简单的答案。请注意,有一些例外和方法可以解决我已经概述的限制,但是对于大部分工作,他们都会坚持下去。




Regular - Windows的标准DLL类型。可以引用MFC组件,但MFC组件无法在应用程序和DLL之间安全地传递。具体而言,已在一个中分配的内存不能在另一个中释放。它的LIB修正和加载时间可以与您的过程分开。必须注意保持进程和DLL之间的严格界限。这个DLL可以有比你的进程更多的编译和链接选项。



扩展 - 这种类型的DLL完全支持MFC并允许安全传递MFC对象以及分配和删除进程和DLL之间的内存和对象。这种类型的DLL,在加载时共享LIB修正,你必须注意使用与你的进程相同的模型来编译和链接它。示例,多线程,MFC,Unicode等...



非MFC - 此DLL不提供对MFC的支持,此DLL中的代码无法生成或分享MFC电话。它与常规DLL共享许多特征。
Your question leads to some complex topics, but I think I can break it down into some simple answers. Note that there are exceptions and ways to get around limitations I''ve outlined, but for most of your work, they''ll hold up.


Regular - Standard DLL type for windows. Can reference MFC components, but MFC components cannot be safely passed between the application and the DLL. Specifically, memory that has been allocated in one cannot be freed in another. It''s LIB fixups and load time, can be separate from your process. Care must be taken to maintain strict boundaries between your process and DLL. This DLL can have different compile and link options than your process.

Extension - This type of DLL fully supports MFC and allows safe passing of MFC objects and allocation and deletion of memory and objects between the process and DLL. This type of DLL, shares LIB fixups when loaded and you must take care to compile and link it using the same models as your process. Example, Multi-Thread, MFC, Unicode, etc...

Non-MFC - This DLL does not provide support for MFC and code in this DLL cannot make or share MFC calls. It shares many traits with the ''Regular DLL''.


这篇关于哪个dll需要在vc ++中注册?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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