Catching run time errors from unmanaged code

  • Thread starter Thread starter Manish Soni
  • Start date Start date
M

Manish Soni

My C# code invokes some unamanged code. My goal is to somehow catch any time
error in the unmanaged code. I want to capture that a show a user friendly
exception to the end user.

-- Manish
 
Most of the time you return an int value from unmanaged code, then check
that value from within your managed code. Usually a zero indicates no
errors/successful completion of unmanaged code; other values can indicate
various error conditions you wish to trap.
 
Back
Top