> I'm writing ATL/COM component in VC6++ (MFC). My component works in VC and > should work in LabView. Different custom exceptions (OLE Exceptions) are > thrown by my component. > > How should I throw exception correctly? (AfxThrowOleException()? > AfxThrowOleDispatchException()?) > > How can I catch this special exception in LabView? >
I think you will need to write your own wrapper DLL to catch the exception and return it to the diagram as an error code. LV doesn't have a built-in catch structure, as it is typically used with other LV code or C code that isn't supposed to return an exception. When a call into a DLL throws an exception, LV catches it and at the moment LV notifies that an exception was caught and I believe it aborts the execution. Greg McKaskle
