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

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

1 Answers  

Let?s assume we have object B and aggregated object C (in- proc server), created by B. Can you access any interface of B from C? What?s the difference between aggregated and contained objects?

3 Answers  

where can i use pmcmd commands of informatica

1 Answers  

Which namespace do the classes, allowing you to support COM functionality, are located?

0 Answers  

Explain object pooling?

1 Answers   HCL,

Futures of COM

3 Answers   MIT,

What are the purposes of AddRef, Release and QueryInterface functions

2 Answers  

What should QueryInterface functions do if requested object was not found?

1 Answers  

Which tool is used to configure the port range and protocols for DCOM communications?

1 Answers  

Write a JCL to copy only selected members from a partitioned data set to another partitioned data set. (Use: IEBCOPY)

1 Answers   Wipro,

Differentiate normal DLL to COM DLL

7 Answers   Talisma,

Do COM keep track of all the object references(Accounting)?

3 Answers   Microsoft,