I have following question : Is it possible that .NET assembly will be regsitered both with Regasm and Regsvcs? Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a timed-out response for the question. but let me explain the differences I am aware of.
In order to understand this, you’d have to conjure up the differences between a COM and a COM+ Application.
Register your types as COM – Creates object on demand everytime a code tries to initialize the object
Register your types as COM+ application – Creates object, supports object pooling, supports transactions, supports enhanced Windows security and more.
To understand pooling, I am borrowing a response from http://www.tek-tips.com/viewthread.cfm?qid=116249
regasm – Registers a .net assembly types as COM. What this means is the regasm picks the publicly exposed types of your .Net assembly and then writes appropriate registry entries at HKCR….; (which is the way regsvr32 works).
regsvcs – Creates a COM+ Application from a .Net assembly. What this means is the regsvcs picks the publicly exposed types of your .Net assembly and besides writing the appropriate registry entries, it also creates a COM+ application that you can manage via the Componet Services Manager Console (%systemroot%\system32\comexp.msc).
regsvcs creates a COM+ application based on the information passed to it from the command line, or based on the information avaialble from the .Net dll.
regsvcs allows you to merge your COM+ types to an existing COM+ application. Take a look at comexp.msc to traverse through to understand a COM+ application and and COmponets that a COM+ manages.
If you write a C# class with ComVisible(true) –> The public types of this class (Foo) is ready to be registered with a regasm for COM.
If you write a C# class with ComVisible(true), inheriting from System.EnterpriseServices.ServicedComponent (and more setting of course..) –> This class (FooBar) is ready to be registered as a COM+ application.
Creating a COM+ application from .Net – You can begin here. Remember COM+ provides advanced transaaction mangement for a COM exposed object.
http://support.microsoft.com/kb/306296
http://my.execpc.com/~gopalan/dotnet/complus/complus.net_accountmanager.html
http://www.codeproject.com/Articles/3845/Creating-COM-Objects-using-EnterpriseServices-in-N