You have a couple of options
- TRY/CATCH
- The Error method of the class you are using
Use COMRETURNERROR to return information to the calling program
>Hello,
>
>I have a VFP8 MTDLL. Inside are various functions. One of the functions is an ErrorProc to handle errors. When I attempt to set ON ERROR DO ErrorProc or ON ERROR This.ErrorProc or ON ERROR DO This.ErrorProc I get an Error (??).
>
>How does one set up an Error handler from within a COM environment?
>
>Thanks
>
>David
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer