Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to create a COM component today?

I want to create a deskband COM object for my pet project. I don't have any experience with COM and a quick search revealed that ATL will simplify things. I was wondering if there are any better ways to create a COM component today. Better in the sense less boiler plate, use of C# instead of C++ and any other things you may think of.

like image 761
sadiq.ali Avatar asked Sep 10 '12 13:09

sadiq.ali


2 Answers

If deploying or relying on a .NET framework installation on the client machine is not an issue for you, than C# is much easier than C++ (although you will probably have to redeclare interfaces, IID, etc... in C#, using P/Invoke). If reducing dependencies is an issue, than C++ with ATL is better.

like image 145
Simon Mourier Avatar answered Oct 12 '22 23:10

Simon Mourier


Just create it in C# and expose as a COM component, see this guide:

http://msdn.microsoft.com/en-us/library/zsfww439.aspx

like image 24
Justin Harvey Avatar answered Oct 13 '22 01:10

Justin Harvey