Very Urgent:Overriding Idispatch Invoke
-
We have an ATL object with dual interface type.The interface definition fron the IDL file: interface IEventSink : IDispatch{ [id(1), helpstring("method testmethod")] HRESULT testmethod(void); [propput, id(2), helpstring("property ondataavailable")] HRESULT ondataavailable([in] IDispatch* newVal); }; We invoke the object from javascript as follows: var esink=new ActiveXObject("IEBrowserSink.EventSink"); esink.testmethod(); esink.ondataavailable=invokecallback; It works fine; Now i oveeride the Invoke method in the header file: STDMETHOD(Invoke)(DISPID dispidMember,REFIID riid, LCID lcid, WORD wFlags,DISPPARAMS * pdispparams, VARIANT * pvarResult,EXCEPINFO * pexcepinfo, UINT * puArgErr) { ...... return S_OK; } After this the calls to the 'testmethod' and 'ondataavilable' from javascript do not go through? There are no exceptions but the scripts seems to skip these methods.What is wrong? Are any changes requied in the idl?
-
We have an ATL object with dual interface type.The interface definition fron the IDL file: interface IEventSink : IDispatch{ [id(1), helpstring("method testmethod")] HRESULT testmethod(void); [propput, id(2), helpstring("property ondataavailable")] HRESULT ondataavailable([in] IDispatch* newVal); }; We invoke the object from javascript as follows: var esink=new ActiveXObject("IEBrowserSink.EventSink"); esink.testmethod(); esink.ondataavailable=invokecallback; It works fine; Now i oveeride the Invoke method in the header file: STDMETHOD(Invoke)(DISPID dispidMember,REFIID riid, LCID lcid, WORD wFlags,DISPPARAMS * pdispparams, VARIANT * pvarResult,EXCEPINFO * pexcepinfo, UINT * puArgErr) { ...... return S_OK; } After this the calls to the 'testmethod' and 'ondataavilable' from javascript do not go through? There are no exceptions but the scripts seems to skip these methods.What is wrong? Are any changes requied in the idl?
I'm not sure though. Try increasing major/minor version(at all occurances in your project) of your object. I found similar problem with newly added function to interface. And changing minor version does trick.
Prasad Notifier using ATL | Operator new[],delete[][^]