Writing a .NET type and consuming that type from unmanaged code are distinct activities for developers. Following links describe several tips for writing managed code that interoperates with COM clients:
To develope a managed type for COM
[link http://msdn2.microsoft.com/en-us/library/7fcfby2t(VS.80).aspx][color red]Qualifying .NET types for interoperation.[/color][/link]
All managed types, methods, properties, fields, and events that you want to expose to COM must be public. Types must have a public default constructor, which is the only constructor that can be invoked through COM.
[link http://msdn2.microsoft.com/en-us/library/d4w8x20h(VS.80).aspx][color red]Applying interop attributes.[/color][/link]
Custom attributes within managed code can enhance the interoperability of a component.
[link http://msdn2.microsoft.com/en-us/library/bctyca52(VS.80).aspx][color red]Packaging an assembly for COM.[/color][/link]
COM developers might require that you summarize the steps involved in referencing and deploying your assemblies.
Additionally, following links identify the tasks related to consuming a managed type from a COM client.
To consume a managed type from COM
[link http://msdn2.microsoft.com/en-us/library/h627s4zy(VS.80).aspx][color red]Register assemblies with COM.[/color][/link]
Types in an assembly (and type libraries) must be registered at design time. If an installer does not register the assembly, instruct COM developers to use Regasm.exe.
[link http://msdn2.microsoft.com/en-us/library/s5628ssw(VS.80).aspx][color red]Reference .NET types from COM.[/color][/link]
COM developers can reference types in an assembly using the same tools and techniques they use to refer other COM types.
[link http://msdn2.microsoft.com/en-us/library/8hw8h46b(VS.80).aspx][color red]Call a .NET object.[/color][/link]
COM developers can call methods on the .NET object the same way they call methods on any unmanaged type.
[link http://msdn2.microsoft.com/en-us/library/c2850st8(VS.80).aspx][color red]Deploy an application for COM access.[/color][/link]
A strong-named assembly can be installed in the global assembly cache and requires a signature from its publisher. Assemblies that are not strong named must be installed in the application directory of the client.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.