Page 1 of 1

Using TeeChart Evens with ATL IDispEventImpl class

Posted: Wed Jul 02, 2008 9:14 am
by 15046925
Hi,

I want to react on TeeChart events by creating an event sink (derived from ATL class IDispEventImpl).

I created the sink map based on the event id's in the teechart.tli file. When I use the teechart in a gui control, each time an event in my sink map is triggered I get the following error:
"Access violation at address 7C901010 in module ntdll.dll. Read of address 00000024."

Here is the call stack when the error occurs:
user32.dll!_NtUserWaitMessage@0() + 0xc bytes
user32.dll!_InternalDialogBox@24() + 0xb6 bytes
user32.dll!_SoftModalMessageBox@4() + 0x677 bytes
user32.dll!_MessageBoxWorker@4() + 0x175 bytes
user32.dll!_MessageBoxTimeoutW@24() + 0x7a bytes
user32.dll!_MessageBoxTimeoutA@24() + 0x9c bytes
user32.dll!_MessageBoxExA@20() + 0x1b bytes
user32.dll!_MessageBoxA@16() + 0x45 bytes
TeeChart8.ocx!0e2f507f()
[Frames below may be incorrect and/or missing, no symbols loaded for TeeChart8.ocx]
user32.dll!_CallNextHookEx@16() + 0x228da bytes
TeeChart8.ocx!0e282ca0()
TeeChart8.ocx!0e284efc()
TeeChart8.ocx!0e2f5196()
user32.dll!_DispatchClientMessage@20() + 0x58 bytes
user32.dll!___fnDWORD@4() + 0x24 bytes
ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 bytes
user32.dll!_NtUserMessageCall@28() + 0xc bytes
user32.dll!_SendMessageA@16() + 0x49 bytes
0012fd58()
TeeChart8.ocx!0e2ffe3c()
ntdll.dll!ExecuteHandler2@20() + 0x26 bytes
ntdll.dll!ExecuteHandler@20() + 0x24 bytes
ntdll.dll!_KiUserExceptionDispatcher@8() + 0xe bytes
ntdll.dll!_RtlEnterCriticalSection@4() + 0xb bytes
> charts.dll!ATL::CComCriticalSection::Lock() Line 87 + 0xc bytes C++
charts.dll!ATL::CComCritSecLock<ATL::CComCriticalSection>::Lock() Line 343 + 0xa bytes C++
charts.dll!ATL::CComTypeInfoHolder::GetTI(unsigned long lcid=0) Line 3763 + 0x8 bytes C++
charts.dll!ATL::CComTypeInfoHolder::GetTI(unsigned long lcid=0, ITypeInfo * * ppInfo=0x0012fa48) Line 3631 + 0xc bytes C++
charts.dll!ATL::IDispEventImpl<1,OMTLS::ChartControlEventSink,&OMTLS::DIID_TEECHART_Events,&OMTLS::LIBID_TEECHART_Events,8,0,ATL::CComTypeInfoHolder>::GetFuncInfoFromId(const _GUID & iid={...}, long dispidMember=8, unsigned long lcid=0, ATL::_ATL_FUNC_INFO & info={...}) Line 4462 + 0x17 bytes C++
charts.dll!ATL::IDispEventSimpleImpl<1,OMTLS::ChartControlEventSink,&OMTLS::DIID_TEECHART_Events>::Invoke(long dispidMember=8, const _GUID & __formal={...}, unsigned long lcid=0, const _GUID & __formal={...}, tagDISPPARAMS * pdispparams=0x0012fb38, tagVARIANT * pvarResult=Empty, const _GUID & __formal={...}, const _GUID & __formal={...}) Line 4167 + 0x20 bytes C++

Posted: Fri Jul 11, 2008 2:10 pm
by Pep
Hi,

We've been doing some tests related to this question, trying to find how to define the sink, unfortunately this area relating to ATL is a little outside our field of experience so although we think that the issue lies with defining the correct interface with which to relate the sink, we are not confident of the exact syntax required to achieve that. If you think you have an approximation of the solution and a test project that you could send us we'll take a look to see if we can offer any comments.

Here, some articles we used to review this issue, maybe they can be helpful :
http://support.microsoft.com/kb/244204
http://support.microsoft.com/kb/194179/