[Openmcl-devel] Does CCL32 still mishandle some exceptions when running on 64bit Windows?

Paolo Micossi paolo.micossi at me.com
Tue Oct 29 06:00:06 PDT 2013

I am experimenting with hosting third party ActiveX controls (using the "AtlAxWin" container from atl.dll) with CCL.
This has been surprisingly easy, except for lots of troubles with exception handling.
While some ActiveX controls worked fine others (and among them the one that motivates my work the most) would crash into the kernel debugger as soon as i tried to create their window. I slowly uncovered that this happened because CCL would try (and fail) to handle some exception that could be easily handled by the C++ runtime/OS/whatever if it was left to its own devices.

I searched the mailing list and found a short thread from last August which pointed me to a revised CCL kernel in the trunk that addressed exactly this point.

And in fact it works, and I can now create control host windows without crashing, but there is still a problem.

The ActiveX control I need most (an interface to a motor controller from Thorlabs which i want to operate from CCL) exists only in 32bit version, so i must load it using CCL32. I can create the ActiveX host window  when running CCL32 under both 64 bit Windows 7 (development PC) and 32bit Windows XP (deployment PC). I connect to the control IDispatch interface and can get/set properties on both systems.

But some method invocations which work fine on 32bit XP fail into the kernel debugger on the 64bit system. Therefore i suspect that some runtime exceptions are still mishandled when CCL32 runs on a 64bit system. This MSDN page in fact hints at some subtle difference in 32bit exception handling when running on 32- or 64- bit systems:


Paolo Micossi

More information about the Openmcl-devel mailing list