Difference between COM and DLL
-
:laugh:I have implemented both applications using COM & DLL. But i don't find out any significance difference.So if anybody knows about it,then please reply me as soon as possible.
Regards, Pankaj Sachdeva
-
:laugh:I have implemented both applications using COM & DLL. But i don't find out any significance difference.So if anybody knows about it,then please reply me as soon as possible.
Regards, Pankaj Sachdeva
[Why the laugh?] A DLL is a set of code packaged into a library which can be used by your application, but is limited to working "in-process". That means it's loaded into your EXE, and has the same access to the memory allocated to the process as any of your other code. Similarly, it runs with the same privileges and user identify that your process does. A COM component (or object, if you will) on the other hand, is a package of code which can be used by your (or any COM-aware) application, possibly even script hosts (VBScript, JScript) if the component implements the necessary supporting functionality. It provides mechanisms for working across process and machine boundaries, and allows (well, insists, sometimes) the configuration of security such that the component may execute under a different identity to the clients of the component. A COM object can implement or provide multiple interfaces, support aggregation, callbacks, and will implement lifetime management. If your only exposure to COM is writing an ATL-based DLL, then it is not surprising that you haven't really appreciated the differences. Where I am (and where I was before) make heavy use of COM, COM+ and DCOM to implement a range of application servers (some of which are also services). None of them are 'network-aware', in the sense that there is no client code which deals directly with locating a component on a remote machine on the LAN and talking to it. COM/DCOM deals with all the plumbing issues, so you can concentrate on making the applications do what they are supposed to. Many of these run 24/7, stopping only for software changes, and sometimes not always then!
Steve S Developer for hire
-
:laugh:I have implemented both applications using COM & DLL. But i don't find out any significance difference.So if anybody knows about it,then please reply me as soon as possible.
Regards, Pankaj Sachdeva
pan_angel wrote:
I have implemented both applications using COM & DLL
The above line doesn't match well with the below one. :doh:
pan_angel wrote:
But i don't find out any significance difference
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.