What happens to an ActiveX control (COleControl) after the call to OnDestroy() ?
- by richj
I have an ActiveX control written in C++ that runs in Internet Explorer 8. Most of the time (approx 90%) when the tab or browser containing the control is closed, there is an access violation like this:
The thread 'Win32 Thread' (0x1bf0) has exited with code 0 (0x0).
Unhandled exception at 0x77b3b9fd in iexplore.exe: 0xC0000005: Access violation reading location 0x65007408.
The access violation occurs after the call to OnDestroy() but before the call to the control's destructor.
The debug output says:
No symbols are loaded for any call stack frame. The source code cannot be displayed.
None of my code is present in the stacktrace, although perhaps the heap was corrupted at some earlier point during execution.
What lifecycle events does an ActiveX control receive between the call to OnDestroy() and the control's destructor?