Hi to everyone,
I'm working on a project done in c++ with visual studio.NET 2003. It
involves a main application and a dll. The idea is to create a dll that
exports some classes. The constructors of these classes must be able to throw
exceptions that should be caught in the main application. The exceptions
thrown are CfileExceptions and COleExceptions.
More or less the process in the main application is:
try
{
call to exported class constructor
.....
}
catch(exception)
{
perform required instructions
exception->Delete()
}
I've tried the dll with some applications and sometimes it works apparently
well but others a "_CrtIsValidHeapPointer" error occurs. First I thought it
could be due to compilation options.
I've read that "Catching exception types derived from an interface is not
supported under /clr. Also, the common language runtime does not permit you
to catch stack overflow exceptions; a stack overflow exception will terminate
the process".
But I've tried also modifying compiler options in an application that works
well and desptite of the /clr it still works.
Another suspicious point is that the exception is created inside the dll but
later it is deleted in the main application. Anyway, I can't figure out any
other way to do it
I'm quite a beginner in programming so any help will be appreciated.