Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a vector of COM object pointers

Status
Not open for further replies.

johnstv4

Programmer
Aug 20, 2002
7
0
0
GB
Hi Everyone,

I'm writing a Dll which stores a list of pointers to COM objects which I create. I then use this vector to locate a desired object which I may need to work on later. I define the vector as follows:


std::vector <LPDISPATCH> m_pObject;


Have a defined the above correctly? Should I be using LPDISPATCH? Please help me.


Thanks

John
 
If all your objects are accessed through a IDispatch based interface, it makes sense. Otherwise, you'd better use LPUNKNOWN (ie IUnknown *) which works with any interface.

 
All my objects are accessed through IDispatch. Thank you so much for your advice.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top