com objects

Is it possible to create COM and DCOM objects using c++. I am not finding a documentation on the website. Every documentation given is given using VC++. Guide me where I can get an documentation.
Who is Participating?
You can skip the docs:

1. Go to "Project->Add Reference...".
2. Choose the "COM" tab
3.  Select or browse to the COM object you want, then click OK.

That's all you need to do (it works for DCOM too).

When you add the reference, Visual Studio will create a Runtime Callable Wrapper (RCW) which will allow you to use the component just as you would any other. There is a bit of overhead involved, however, so it's best to use .NET classes where available of course.
Windows API has enough APIs to manipulate COM objects even in raw C.
VC++ is preferred because of ATL library - Collections, strings, components wizards usually simplify life.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.