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

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

问题描述

对于一个附带项目,我需要编写一个需要使用第三方 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 框架中的代码".基于 COM 构建的技术互操作性也是涵盖-Windows 的互操作性窗体控件和 ActiveX 控件,与 COM+ 的互操作性,以及与分布式 COM 的互操作性(DCOM).虽然平台调用服务是一种独立的技术COM 互操作性,有很多重叠的区域,因此包括在书是天作之合.所有这些技术是核心部分公共语言运行时和 .NET框架,并且可能不会被使用仅作为迁移​​的路径现有的软件项目,但对于全新的软件开发未来几年

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 互操作性,您可以从 TheServerSide.com 下载.您必须先注册才能下载,但如果您不这样做,您可以 bugmenot感觉不错.

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.

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

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