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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

heeelp!

Status
Not open for further replies.

jayjay60

Programmer
Jun 19, 2001
97
FR
I tried to do an exercise i have found on the msdn online site. The article ID is Q186427, and is called "HOWTO: Catch microsoft excel application events using VC++"

During the "Build step" i met a C2259 Error :"cannot instantiate abstract class..." This message is for the class CMyEventDispatch. So if someone could help me to solve my problem he could save my life!!!

thanks
 
You have probably declared an function inside your CMyEventDispatch class as pure virtual(=0), then you have tried to instantiate it like:

CMyEventDispatch evDispatch;
which acording to C++ theory is not allowed.

Hope this helps, s-) Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
You must get the IDispatch through calling of QueryInterface of by calling CoCreateInstance. You can use only pointers to IDispatch, because it is an abstract class. You you are building a server, you can only derive a class from IDispatch and implement all its methods. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top