tags:

views:

110

answers:

1

When an application is run from within the IDE and the debugger is attached the exception 'External exception C0000008' is raised when it tries to connect to an imported ActiveX control.

If the application is ran standalone or the Rad Studio options/ Debugger Options/ Integrated debugging is unchecked, the program works as expected, no exception and the ActiveX control returns the expected result.

There are other ActiveX controls in the project, all of which work fine.

I have tried: - Reinstalling the ActiveX control - Re-Importing the ActiveX control - Removing any software that may be causing conflicts (experts/ plug-ins etc) - Turning off most running applications and services etc in case they are causing a conflict

Searching Google, It looks like others have been experiencing the same problem, but there is no fix to be found (other than turn off Integrated debugging, but obviously that is not a valid option.

Does any one have any ideas were to look to fix this problem?

I am using Delphi 2007

+1  A: 

C0000008 is the status returned for an invalid handle. Make sure that your wrapper when it goes to create the object gives it a proper handle and not nil (assuming it is crashing because of a windows handle).

Since the application runs fine when not attached to the debugger, I'm assuming that the wrapper is handling this condition gracefully so the error is most likely occurring inside a try/except block.

skamradt