开发者

Component Object Model via C++(maybe VS)

I was se开发者_高级运维arching through google about Microsoft Component Object Model. Found only few normal articles and only 1 step by step example, which doesn't work. Is there any links/references/books/tutorials you know how to build simple COM component via VS C++? Any answer or help would be appreciated!


COM is generally considered antiquated technology these days. That's not to say nobody is still using it - there are plenty of legacy systems that are still invested in it - but it's rare to find someone approaching it as a newbie nowadays.

I'm not sure if things have moved on much but my recommendations would be Don Box's Essential COM and ATL Internals .

Actually my overriding recommendation would be to avoid it if you can :-)


Start with reading

Essential COM by Don box

a must read for anyone who wants to do COM development.


Inside Com - Dale Rogerson is a classic book and also code project has good examples on it:

http://www.codeproject.com/KB/COM/comintro.aspx


MSDN provides a tutorial for building com with ATL here: http://msdn.microsoft.com/en-us/library/599w5e7x(VS.71).aspx

It should be good material for getting start.


If you don't have a really good reason to learn COM, I suggest getting into .NET instead. COM a legacy technology, which still lives with us, and sometimes we need to maintain software that use it, or interoperate with it. But there is no good reason to use it for brand new development, in my opinion.

Some COM weaknesses:

  • Message pumping
  • Reference counting (caused problems with circular references)
  • DLL hell

I read somewhere that .NET was first called COM 2.0 internally (sorry, I couldn't find a reference), but later on it has grown into a much more complete platform. It has overcome COM's weaknesses, and provides a great class library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜