COM, COM+, DCOM, where to start?

2019-01-30 19:19发布

I am curious about COM+, DCOM. I know that MSFT does not encourage you to use this tools natively (meaning with C/C++, in fact there is not a lot of documentation available) but I want to learn to use these technologies, like embedding Internet Explorer into a C program.

I thought that maybe I could find people that worked with this or that knows about this technology.

Where to start? Any ideas? Any example (like Hello World DCOM)?

标签: c++ c com com+ dcom
7条回答
仙女界的扛把子
2楼-- · 2019-01-30 20:04

I compiled a list of books, which should be read in this order:

  1. 'Inside COM' from Dale Rogerson, This should be your first book. It explains the basics of reference counting, interfaces, IUnknown, components, idl, IDispatch, automation types and apartments. From this book you will notice that it takes quite some code to make components and that you can easily skip a 'Release', which leads to resource leaking. Also this books lacks some details.
  2. 'ATL Internals' from Tavares. ATL helps you with both client use as making COM components. With smart pointers (e.g. CComPtr) it's hard to get the reference counting wrong these days. ATL also facilitates in making components in c++. Unfortunately ATL hides many functionality in macro's and has a counter intuitive way to implement IUnknown. An alternative might be 'Inside ATL'.
  3. 'Essential COM' from Don Box. This book is mentioned frequently but it is not a good beginners book. It misses the overall picture, but is great in its details (e.g. the difference between 'size_is' and 'length_is' in idl).
  4. 'Understanding ActiveX and OLE: A Guide for Developers and Managers'. This books touches some of the more esoteric interfaces like IPersist, IStorage; IMoniker etc., but does not go into great detail.

Be aware that COM is somewhat of an old technology, though still viable especially for native developers.

查看更多
登录 后发表回答