To expose COM components to the .NET Framework
- Import a type library as an assembly.
The common language runtime requires metadata for all types, including COM types. There are several ways to obtain an assembly containing COM types imported as metadata.
- Create COM types in managed Code.
You can inspect COM types, activate instances, and invoke methods on the COM object the same way you do for any managed type.
- Compile an interop project.
The .NET Framework SDK provides compilers for several languages compliant with the Common Language Specification (CLS), including Visual Basic .NET, C#, and the Managed Extensions for C++.
- Deploy an interop application.
Interop applications are best deployed as strong-named, signed assemblies in the global assembly cache.
本文介绍了如何将COM组件暴露给.NET Framework使用的方法,包括导入类型库为程序集、创建包含元数据的程序集以及编译互操作项目等内容。
725

被折叠的 条评论
为什么被折叠?



