I've not done this level of stuff in years, but my supicion is that SHEException is the way to go.
This class has a Data member that can be filled with information so I suspect that what the C++ code needs to do is to map any C++ exception into an appropriately formatted _EXCEPTION_RECORD and __throw (?) this out.. Probably from an interface point in the C++ code. On 31 January 2014 18:19, Greg Keogh <[email protected]> wrote: > Folks, the Borland C++ developer and I have to work out some sort of > contract so he can pass me error information. Since almost every native > function returns a string of XML, he decided (as a quickie) to just send > back something like this: > > <error code="666">This is some explanation</error> > > This works of course but it feels quite clumsy, especially when you're so > used to try-catch in managed code. I wrote a tiny Visual C++ library to > call from C# and look for a better technique, but no luck so far. If I > "throw" in C++ all you get back on the managed side is a > SEHException<http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.sehexception(v=vs.100).aspx>which > contains no information about what happened on the native side. > > Has anyone been through this sort of thing before? > Greg K > -- regards, Preet, Overlooking the Ocean, Auckland
