COM,COM +,DCOM,从哪里开始? [英] COM, COM+, DCOM, where to start?

查看:178
本文介绍了COM,COM +,DCOM,从哪里开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇COM +,DCOM。我知道MSFT并不鼓励你本身使用这个工具(C / C ++的意思,其实也没有很多可用文档),但我想学习使用这些技术,如嵌入的Internet Explorer进入C程序。

我想,也许我能找到与此工作过或知道这个技术的人。

从哪里开始?有任何想法吗?例如,任何(类似的Hello World DCOM)?


解决方案

如果你是认真学习COM,Don Box的基本COM绝对是一个绝对的必读。 COM可以是混乱和我的愚见唐盒是少数人究竟是谁知道了。

之一

在基本COM的例子code是在C ++中。你不会找到很多书,支持COM在C您可以用C写的COM,但它会非常的非常的痛苦。 COM为C ++开发进行了优化。

这本书是不完美的,也不是完成。有一些(当然,有点深奥),这本书撇去了地方。例如,书中有像绰号(我从来没有见过一个绰号待遇的满足我)1 1/2页。我认为这本书是根本性的书。

二,在现实生活中,你可能希望使用支持库,如ATL,而不是直接写所有的COM胶水。有太多的办法,使在COM细微的失误,即使在基本设置。 ATL会给你很好的模式和实施无聊code你。在学习上,你最好使用纯C ++。

有关于ATL很多书和几个都相当不错。我理解,因为VC ++ 6老天ATL已经改变了不少,但我没有第一手知识有:可悲的是,大部分的COM code我永远锁定的味道上班C ++在VC6。

确认书无论您获得Visual Studio和/或你刨使用ATL的版本写的。

在COM书籍一些背景资料:

请注意,有很多书在那里,误解COM,或者专注于错误的东西。旧的书在这方面差。一些前几本书处理COM是不是让OLE工作需要一个管道的细节多一点(对象链接和嵌入,这就是允许你拖和拖放A S preadsheet范围到Word文档)。正因为如此,很多材料在那里非常混乱。过了好一会儿才让人意识到,OLE不是那么重要,COM确实是。

到时候唐盒出版的基本COM,COM组件的基础上的裂缝已经开始变得明显。有没有什么与COM可怕的缺陷,但发展社会的需求已经发展并超越COM什么也没有严重的改造做的。

.NET诞生出努力解决在COM中的限制,特别是在类型信息的区域。 有效COM出版短短几年后,社会各界的注意力转移客场.NET。正因为如此,良好的COM培训材料是现在将可能永远保持有限的。

所以,COM不破,和它的作品非常适合它使用的东西(这就是为什么浏览器仍然使用它)。这只是不是最好的解决方案了许多的,今天需要解决的问题。

在总结:

我建议的基本COM为基础。然后,任何的许多好的书籍ATL提供(无强preferences那里),然后用其他资源,如MSDN或 - 当然 - 堆栈溢出,覆盖那些您特别感兴趣的领域。

如果您宁愿避免依赖的死树各种资源,继续前进,从网上学习ATL。但有的书值得一​​读的老式方法 - 与基本COM就是其中之一。

祝你好运。

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)?

解决方案

If you are serious about learning COM, Don Box's "Essential COM" is definitely an absolute "must read". COM can be confusing and in my humble opinion Don Box is one of the few people who actually "got it".

The example code in "Essential COM" is in C++. You won't find many books that support COM in C. You can write COM in C, but it will be very, very painful. COM is optimized for C++ development.

This book is not perfect nor "complete". There are some (granted, a bit esoteric) areas that the book skims over. For example, the book has like 1 1/2 pages on "monikers" (I have never seen a treatment of monikers that satisfies me). I consider this book to be THE fundamental book.

Second, in real life you are likely to want to use a supporting library such as ATL, rather than writing all the COM glue directly. There are too many ways to make subtle mistakes in COM even in the basic set up. ATL will give you good patterns and implement the boring code for you. In learning, you are better off using plain C++.

There are many books about ATL and several are quite good. I understand that ATL has changed quite a bit since the old days of VC++6, but I don't have first hand knowledge there: sadly, most of the COM code I work with is forever locked to the flavor of C++ in VC6.

Make sure whatever book you get is written for the version of Visual Studio and/or ATL you are planing on using.

Some background on COM books:

Note that there are a lot of books out there that misunderstand COM, or focus on the wrong things. The older books are worse in this respect. Some of the first few books treated COM as little more than a plumbing detail needed to make OLE work ("Object Linking and Embedding", that's what allows you to drag-and-drop a spreadsheet range into a Word document). Because of that, a lot of the material out there is very confusing. It took a while before people realized that OLE wasn't that important and that COM really was.

By the time Don Box published "Essential COM", the cracks on the foundation of COM had started to become evident. There isn't anything terribly flawed with COM, but the needs of the development community had evolved and outgrown what COM could do without serious revamping.

.NET was born out of that effort to address the limitations in COM, especially in the area of "type information". Just a few years after "Effective COM" was published, the attention of the community shifted away to .NET. Because of that, good COM training material is now and will likely remain forever limited.

So, COM is not broken, and it works great for the things it's used for (that's why Explorer still uses it). It's just not the best solution anymore for many of the problems that need solving today.

In summary:

I recommend "Essential COM" for the basics. Then, any of many good ATL books available (no strong preferences there), and then use other resources like MSDN or -- of course -- Stack Overflow, to cover areas that are of particular interest to you.

If you'd rather avoid relying on resources of the dead-tree variety, go ahead and learn ATL from the web. But some books are worth reading the old fashioned way -- and "Essential COM" is one of them.

Good luck.

这篇关于COM,COM +,DCOM,从哪里开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆