I've only done COM interaction with Python, which interrogates the object server to find out what the interface is.
In general, I think the C++ technique boils down to (roughly, I don't know if these names or syntax are correct):
- Code: Select all
sdb = new ComObject("SongsDB.Application");
sdb->Invoke(methodID); // where you need to have a list of methodIDs
I did find
this tutorial online. The guy who wrote it was talking about it in another forum, and said that altho it's primarily PowerBasic-related, the first tutorial has a lot of C++ code. Maybe it will help.
I also saw a reference saying that using Microsoft's ATL library is the best way to interface to COM from C++.