COM and COM+ in C#
-
You Can Create COM+ Application in .Net By Create your dll and inherit your class from
ServicedComponent
and assign Your assembly and each of its classes with distinct GUID values by using theGuid
attribute if you don't give it guide value it in the following assembly registeration will assign one for each element But as you now Com+ undersatnd COM not .Net Component so to let other COM Client Find and Use your component you need to register your .Net Component as COM Server in Windows Registry This process called Asssembly Registration 1-sign a .NET assembly using the Strong Name tool (sn.exe). 2-Register your assembly You can do it by more than one way for example in your Project Properties change Register for COM Interop option to true or Use the Assembly Registration tool regasm.exe for more info look at Creating COM+ Objects using EnterpriseServices in .NET [^] COM/COM+[^] ServicedComponent Class[^] To Export your Component As COM Type Libraries You Can use the tools mentioned above but notice that you don not have to inhiret fromServicedComponent
ie 1-Create Your Component 2-Export it as Type Lib By Using one of the following tools *-In Project Properties Set Register for COM Interop option to true *- Use the Assembly Registration tool (regasm.exe
) with its/tlb
option *-Use the Type Library Exporter tool (tlbexp.exe
) MCAD -- modified at 14:52 Thursday 29th September, 2005