Differentiate normal DLL to COM DLL

Answers were Sorted based on User's Feedback

Differentiate normal DLL to COM DLL..

Answer / riddhi

COM Dll exposes Interface on the contrary to normal DLL
that exports functions. Clients create the pointer to
COMDLL's interface to call the methods defined by the
component that implements the interface.
That results in isolation of implementation and definition
of method in the interface. Client doesnt need to relink or
recompile the code if method in the com dll changes as far
as the definition of the interface remains same.

Is This Answer Correct ?    19 Yes 3 No

Differentiate normal DLL to COM DLL..

Answer / vijay kumar bhatia

2nd answer is correct. Also following differences can be
COM DLL is registerable dll while normal is non-registerable

COM DLL only exports following 4 functions
* DllGetClassObject.
* DllRegisterServer.
* DllUnregisterServer.
* DllCanUnloadNow

Is This Answer Correct ?    9 Yes 2 No

Differentiate normal DLL to COM DLL..

Answer / sunil choubey

COM DLL has to implement at least IUnknown inteface, however this is not the restriction of regulare DLL.

You have to register COM DLL by using regsvr32 utility, and its information is store in windows registry, this is not in case of normal DLL.

You have to put normal dll in path or current directory, but not in case of COM DLL.

You can use COM DLL in any language, but if you want to do it with normal dll then you have to export plan function, this should not be Object Oriented. If you try to export classes from normal DLL or make MFC extension then you cant use it in VB and scripting language like VB Script.

By making COM DLL you have to export its interface and write it in IDL file and in case of normal DLL you do it either in DEF file or using _declspec(export) with function or class name.

Is This Answer Correct ?    1 Yes 0 No

Differentiate normal DLL to COM DLL..

Answer / elangovv

To add with the answer 2 and 4. In COM dll we can implement
the OOP's concepts were as in regular DLL it is not
possible. Like encapsulation, inheritance, polymorphism ect...

Is This Answer Correct ?    1 Yes 2 No

Differentiate normal DLL to COM DLL..

Answer / pranesh archak

A normal DLL can export any function.
A COM DLL is the one which exports COM APIs like
* DllGetClassObject.
* DllRegisterServer.
* DllUnregisterServer.
* DllCanUnloadNow.

Is This Answer Correct ?    6 Yes 9 No

Differentiate normal DLL to COM DLL..

Answer / saravanan k

Classic DLLs are function libraries while ActiveX(COM)
DLLs are objects. The difference is like the difference
between procedural and object oriented programming.
API style Declare statements are needed for routines in
a 'normal' DLL and and an ActiveX(COM) DLL is treated like a
class object.

Is This Answer Correct ?    2 Yes 5 No

Differentiate normal DLL to COM DLL..

Answer / krishna s

classic DLLs are not platform independent, can export
functions, classes(only MFC application can import these
Need to remember location of the DLL before loading.

Where as COM is platform indenpendent.
No need to remember the COM DLL location for loading
instead need to register using regsvr32 utility.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More COM DCOM Interview Questions

where can i use pmcmd commands of informatica

1 Answers  

how do you know it is general dll or com dll

5 Answers  

How to Use structs in COM interfaces when Automation compatibility is not an issue?

1 Answers  

how you call a dll as a COM dll.

2 Answers  

How can would you create an instance of the object in COM

2 Answers  

C is aggregated by B, which in turn aggregated by A. Our client requested C. What will happen?

2 Answers  

Define and explain COM?

8 Answers   Microsoft,

What are the different compatibility types when we create a COM component?

1 Answers   TCS,

Explain JIT activation?

1 Answers  

what is oops

11 Answers   Accenture,

How do you make a NET component talk to a COM component?

3 Answers   TCS,

can a COM interface be implemented by more than one COM class in the same COM component?

2 Answers   Cap Gemini, Honeywell,