View Single Post
  #4 (permalink)  
Old November 5th, 2004, 04:10 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can use a .NET assembly in COM. There is a setting in the project properties to register the assembly for COM interop. Of course, as mentioned, you must still have the .NET framework on the machine because the underlying code is still managed .NET code.

Property Properties -> Configuration Properties -> Build -> Register for COM Interop

You can perform this manually with the Assembly Registration Tool (Regasm.exe) found in the framework directory. Here's what MSDN says:

"The Assembly Registration tool reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class."

http://msdn.microsoft.com/library/de...lregasmexe.asp


Also, if that doesn't get you what you need, you can use the Type Library Exporter (Tlbexp.exe) found in the Visual Studio SDK to create a COM consumable type library. Take a look at MSDN for more details:

http://msdn.microsoft.com/library/de...rtlbexpexe.asp
Reply With Quote