ReplaceCallback - Replace an existing callback with a new one |
Top Previous Next |
Syntax
<nAddress> := ReplaceCallback( <nAddress>, <cbCallbackBlock>, [<nCallConvention>] )
Parameters
<nAddress>
Address of old callback to be replaced with new one.
<cbCallbackBlock>
New codeblock to be executed when a call to <nAddress> takes place.
<nCallConvention>
Calling convention to be used for the callback. See Callback.ch for supported conventions. Default is the convention currently used for the installed callback at address <nAddress>.
Return value
Always NIL. A SysError is thrown if an error occurs.
Description
ReplaceCallback can be used to change the codeblock to be executed when a certain callback is called. This can be helpful if the first-time codeblock must do some initializing. It can then call ReplaceCallback to install a different codeblock that takes care of subsequent calls. If an error condition is met (e.g. unknown <nAddress> given), SysError is called.
For more details about callbacks turn to Callbacks.
Classification
Core
Category
Quick Info
Library: cckptcor.lib / cckptcor.dll Header: Callback.ch
See also
Callback, RequestCallback, ReleaseCallback.
Example
|