Ross Levis wrote:
> function ExceptionFilter(ExceptionPointers: TExceptionPointers): 
> LongInt;
> begin
>   Result := $ffffffff;
> end;

The named constant for that return value is 
Exception_Continue_Execution, which corresponds to VB's "On Error Resume 
Next" statement.

And remember that this function needs to be a stdcall function. Its 
parameter should be a _pointer_ to a TExceptionPointers record.

> SetUnhandledExceptionFilter(@ExceptionFilter);
> 
> No AV error is produced and the program continues on as usual.  I'm now 
> wondering if ExceptionPointers provides some information on the details 
> of the error.

Wonder no more. SetUnhandledExceptionFilter, its callback function, and 
the Exception_Pointers record are all documented in MSDN.

TExceptionPointers has two fields, an exception record, and a context. 
The latter contains the state of the CPU registers at the time the 
exception was raised. You can read about the contents of that record in 
Windows.pas. The exception record will probably be more useful. It tells 
you the exception code (so you can respond to Exception_Access_Violation 
differently than you respond to exceptions you're not expecting). There 
is also an ExceptionInformation field, which tells you additional, 
exception-specific information.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to