Write a wrapper managed class for your C++ component. And create your own
exception class
Assume your unmanaged code contains a method like foo
void foo(){}
In wrapper class implement foo as ;
void foo()
{
try
{
//Call unmanaged foo here
}
catch(Exception ex)
{
throw new MyException(ex);
}
}
In all around your code you should handle only MyException for all unmanaged
exceptions...
HTH
--
Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
"yaron" <ya***@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Hi,
How do i catch an unmanaged c++ exceptions ?
right now i can catch the System.Runtime.InteropServices.SEHException and
System.Exception exceptions , but i wan't to catch myException unmanaged
class , how do i do this ?
Thanks.