任何好的教程使用COM从C#? [英] Any good tutorials on using COM from C#?

查看:127
本文介绍了任何好的教程使用COM从C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个侧面项目,我需要编写一个需要使用第三方INPROC COM对象的C#应用​​程序。不幸的是,C#不是我的主要编程语言,所以我的知识有点有限。是否有任何好的教程如何从C#访问COM对象?这个第三方COM对象的使用需要我创建指定COM接口的实现,并将该实现提供给COM对象,以使其能够运行。

For one of a side-projects i need to write a C# app that required to use a third-party INPROC COM object. Unfortunately, C# is not my primary programming language, so my knowledge is a bit limited. Is it any good tutorials available on how to access COM object from C#? The usage of this third-party COM object requires me to create implementation of specified COM interface and supply that implementation into COM object in order for it to function.

推荐答案

有一本好书叫做 .NET和COM:完整的互操作指南,我即将开始阅读,因为我想更好地理解COM互操作。

There is a good book called .NET and COM: The Complete Interoperability Guide that I am about to start reading as I want a better understanding of COM interop. Maybe it would be useful for you too, check it out.


本书的重点是COM
互操作性(自从它是一个多
更大的主题),
讨论的核心分为四个
部分:

The focus of the book is on COM Interoperability (since it's a much larger subject), and the heart of the discussion is broken down into four parts:

* Using COM Components Within the .NET Framework
* Using .NET Framework Components from COM
* Designing Good .NET Framework Components for COM Clients
* Designing Good COM Components for .NET Framework Clients

本书的范围只是关于
非托管
代码在.NET Framework中。
基于COM
构建的技术互操作性也是
覆盖 - Windows的互操作性
表单控件和ActiveX控件,
与COM +的互操作性和
互操作性与分布式COM
(DCOM)。虽然平台调用​​
服务是一种与
COM互操作性不同的技术,但是有许多
重叠区域,因此在
书中包括一个自然契合。所有这些
技术是
Common Language Runtime和.NET
Framework的核心部分,并且可能不会使用
作为$ b $的迁移路径b现有软件项目,但对于
未来几年
的全新软件开发

The scope of the book is just about everything related to using "unmanaged code" in the .NET Framework. Technologies built on top of COM Interoperability are also covered-Interoperability of Windows Forms Controls and ActiveX controls, Interoperability with COM+, and Interoperability with Distributed COM (DCOM). Although Platform Invocation Services is a separate technology from COM Interoperability, there are many areas of overlap, so including in the book is a natural fit. All of these technologies are a core part of the Common Language Runtime and .NET Framework, and will likely be used not only as the path of migration for existing software projects, but for brand new software development for the next several years

查看此(合法)免费的pdf电子书 COM和.NET互操作性< a>,您可以从TheServerSide.com下载。您必须先注册才能下载,但如果您不能下载,您可以 bugmenot , t感觉像这样。

Also have a look at this (legally) free pdf ebook COM and .NET Interoperability which you can download from TheServerSide.com. You have to register before you can download, but you can just bugmenot if you don't feel like it.

这篇关于任何好的教程使用COM从C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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