ASP Programming Question:

Can .NET Framework components be used from a COM program?

Tweet Share WhatsApp

Answer:

Yes. Managed types you build today can be made accessible from COM, and in the common case the configuration is totally automatic. There are certain new features of the managed development environment that are not accessible from COM. For example, static methods and parameterized constructors cannot be used from COM. In general, it is a good idea to decide in advance who the intended user of a given type will be. If the type is to be used from COM, you may be restricted to using those features that are COM accessible.
Depending on the language used to write the managed type, it may or may not be visible by default.
Specifically, .NET Framework components are accessed from COM by using a COM callable wrapper (CCW). This is similar to an RCW (see previous question), but works in the opposite direction. Again, if the .NET Framework development tools cannot automatically generate the wrapper, or if the automatic behavior is not What you want, a custom CCW can be developed.

Download ASP Programming PDF Read All 194 ASP Programming Questions
Previous QuestionNext Question
Can I use COM objects from a .NET Framework program?Can I use the Win32 API from a .NET Framework program?