INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Links

Developing managed types for COM and consuming managed types from COM by computerjin
Posted: 16 Jun 07


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
Qualifying .NET types for interoperation.
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.

Applying interop attributes.
Custom attributes within managed code can enhance the interoperability of a component.

Packaging an assembly for COM.
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
Register assemblies with COM.
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.

Reference .NET types from COM.
COM developers can reference types in an assembly using the same tools and techniques they use to refer other COM types.

Call a .NET object.
COM developers can call methods on the .NET object the same way they call methods on any unmanaged type.

Deploy an application for COM access.
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.


Hope it helps.
 

Back to Visual Basic (Microsoft) VB.NET FAQ Index
Back to Visual Basic (Microsoft) VB.NET Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close