type PVoid = pointer; TDBL_S32 = longint; TDBL_BOOL = longbool; TDBL_pFuncExceptionHandler = procedure(ErrorCode: TDBL_S32; IsFatal: TDBL_BOOL) of object; function DBL_SetExceptionHandler(ExceptionHandler:TDBL_pFuncExceptionHandler):PVoid; cdecl;external 'cfront.dll'; [...] implementation [...] procedure myhandler(ErrorCode: TDBL_S32; IsFatal: TDBL_BOOL) cdecl; var e:string; begin raise Exception.Create(e); showmessage(e); end; [...] procedure TForm1.KOLForm1FormCreate(Sender: PObj); var myhandler: TDBL_pFuncExceptionHandler; begin DBL_Init; DBL_SetExceptionHandler(myhandler); try [...] DBL_ImportFOB(FOBPath,1); //it works if the file is normaly exported [...]many thanks
Comments
..drops into debugger.. it's normal.. if program run by clicking exe file, exceptions are handled perfectly...
to hide program's messages about any error (before exception catched) i used
thanks XD