COM Class Vs. Sn.exe, Gacutil.exe and Regasm.exe

G

Guest

There seems to be two ways of creating a COM in .NET

1) Select the COM Class template

2) Create a class and then use Sn.exe, Gacutil.exe, and Regasm.exe to assign the assembly to GAC and COM to registry

I know that COM Class option is a lot easier to use. However, is there any drawbacks from using this instead of option two? Is it suggested that you rather use option 2) even it's a lot more tedious

Thanks for info.
 
S

Sam Gentile [MVP - C#/.NET]

I don't know what you mean by "create a COM." 1 and 2 are completely
different. 1 creates an Unmanaged COM component that executes on the
unmanaged heap. 2) creates a Com Callable Wrapper (CCW) such that COM can
call into .NET code.

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
and
http://msdn.microsoft.com/netframew...brary/en-us/dndotnet/html/useframewktools.asp

--
--------------------------------------------------------------
Sam Gentile [C#/.NET MVP]
..NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------
Anonymous said:
There seems to be two ways of creating a COM in .NET:

1) Select the COM Class template.

2) Create a class and then use Sn.exe, Gacutil.exe, and Regasm.exe to
assign the assembly to GAC and COM to registry.
I know that COM Class option is a lot easier to use. However, is there any
drawbacks from using this instead of option two? Is it suggested that you
rather use option 2) even it's a lot more tedious?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top