I would suggest looking into ATL if you are using C++, and using C++ if using C. It is very easy to use the #import construct to access COM objects in DLLs or EXEs.
+2
A:
kenny
2009-01-03 22:39:40
+1 : Absolutely, ATL is the way to go in C++.
Otávio Décio
2009-01-03 22:42:41
but that is not really what this person is asking.
cbrulak
2009-01-03 22:45:48
While kenny may not have answered what was asked, he did give an answer to the underlying problem, which is often more valuable.
Steve Steiner
2009-01-03 22:48:19
Where can I find examples, using ATL with C++ - Thanks in advance
Aaron
2009-01-03 23:51:02
+2
A:
Actually, you will need to instantiate the object using the COM interface.
This is fairly complicated, more than we can just answer here.
here is a good primer: http://www.codeproject.com/KB/COM/comintro.aspx
Another one: http://www.codeguru.com/cpp/com-tech/activex/tutorials/article.php/c5567
cbrulak
2009-01-03 22:43:10
+1
A:
There is a wonderful article at Microsoft that seems to address this exact question. If you want to stick with straight C++ (i.e. MFC/ATL), you should check out the article as it has loads of sample code:
Scott Saad
2009-01-03 22:46:55