Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC6 .NET DLL
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.
Posted 9-Jan-13 3:33am
Edited 9-Jan-13 5:31am
v2
Comments
Richard MacCutchan at 9-Jan-13 8:38am
   
Your question is not clear. If yuu have COM enabled libraries then they should be registered. If they are just "standard" C++ libraries then they just need to be in the library search path for the loader.
Sergey Alexandrovich Kryukov at 9-Jan-13 9:43am
   
My 5. I would skip explanation of how COM works (and advice to avoid using it, if possible)...
—SA
Vaibhav_J_Jaiswal at 9-Jan-13 9:54am
   
Is any link which explaining the working with and registration of dll?
Richard MacCutchan at 9-Jan-13 10:00am
   
The first question you need to answer is "why do my DLLs need registration?"
 
You have not explained where these DLLs come from, what they will be used for, or why you think they need registration. Please update your question with some more details about your problem.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Vaibhav_J_Jaiswal at 10-Jan-13 5:09am
   
Why DLLs need registration? Is any link which explaining the working with and registration of dll?
H.Brydon at 10-Jan-13 10:40am
   
A DLL does not need registration unless it has a COM/DCOM/COM+ interface (which I will call "COM"). If you are not writing a COM DLL then you don't need to register it for anything. In fact I would discourage you from writing anything COM. If you really want to know about it, I suggest 3 links http://www.microsoft.com/com/default.mspx , http://en.wikipedia.org/wiki/Component_Object_Model , and http://stackoverflow.com/questions/900123/com-com-dcom-where-to-start . If you don't know what COM is, don't start, and your DLL(s) likewise do not need registration.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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'.
  Permalink  
Comments
Vaibhav_J_Jaiswal at 10-Jan-13 5:09am
   
Why DLLs need registration? Is any link which explaining the working with and registration of dll?
JackDingler at 10-Jan-13 11:07am
   
That questions has been answered.
 
Not all of them do. But those that contain COM objects or .Net assemblies do, because they publish object GUIDs into the registry so that applications can find them w/o knowing beforehand, the DLL file name or path.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 398
1 DamithSL 235
2 OriginalGriff 230
3 Zoltán Zörgő 149
4 Dave Kreskowiak 120
0 OriginalGriff 7,575
1 DamithSL 5,529
2 Sergey Alexandrovich Kryukov 5,279
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100