RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.SafeCallErrorProc Variable

SafeCallErrorProc defines a procedure that is called when a safecall routine incurs an error.

Pascal
SafeCallErrorProc: TSafeCallErrorProc;
C++
TSafeCallErrorProc SafeCallErrorProc;

A function or procedure defined with the safecall directive is invoked using a safe calling convention. When such a routine incurs an error, the System::TObject::SafeCallException is invoked. However, you can override this call by defining your own handling routine, and setting SafeCallErrorProc to point to it.  

SafeCallErrorProc should point to a procedure that takes two parameters :  

ErrorCode is an integer holding the error code. 

ErrorAddr is the code address at the time of error. 

If SafeCallErrorProc returns normally, or is set to nil, then the ESafecallException is raised. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!