Hiya,
I'm attempting to implement the Visual Studio Application model in a small app that I can test add-ins with. All-in-all it worked fine, but then I thought I should do it nicer, more ATL-ish, but being fairly new to ATL (its also an exercise/excuse to work with ATL) I can't get the implementing of the IDispatch straight.
With a class declaration as:
I keep getting "cannot instantiate abstract class due to .... long __stdcall IApplication::GetTypeInfoCount(unsigned int *)" and the other IDispatch methods as well.
I thought these methods are implemented by the IDispatchImpl template class. Well, obviously not since I get the error...
What am I stupidely missing?
Thanks
/Per
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
I'm attempting to implement the Visual Studio Application model in a small app that I can test add-ins with. All-in-all it worked fine, but then I thought I should do it nicer, more ATL-ish, but being fairly new to ATL (its also an exercise/excuse to work with ATL) I can't get the implementing of the IDispatch straight.
With a class declaration as:
Code:
class ATL_NO_VTABLE CApplicationStub :
public IApplication, // The iface I want to implement (it defines the various IDispatch methods as pure virtual)
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CApplicationStub, &CLSID_ApplicationStub>,
public IDispatchImpl<IApplicationStub, &IID_IApplicationStub, &LIBID_ATLTestLib>
{
public:
CApplicationStub()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_APPLICATIONSTUB)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CApplicationStub)
COM_INTERFACE_ENTRY(IApplicationStub)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
// etc...
I keep getting "cannot instantiate abstract class due to .... long __stdcall IApplication::GetTypeInfoCount(unsigned int *)" and the other IDispatch methods as well.
I thought these methods are implemented by the IDispatchImpl template class. Well, obviously not since I get the error...
What am I stupidely missing?
Thanks
/Per
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."