Callback - Provide a C callable callback |
Top Previous Next |
<nAddress> := Callback( <cbCallbackBlock>, [<nCallConvention>], [<cErrorInformation>] )
<cbCallbackBlock>
Codeblock to be executed when a call to the returned address takes place.
<nCallConvention>
Calling convention to be used for the callback. See Callback.ch for supported conventions. Default is CALLBACK_CALLCONVENTION_STDCALL.
<cErrorInformation>
A string holding the information to be displayed if an error occurs during installation of the callback.
A LONG value representing an address that can be called like a C function. A call to the address returned by Callback will lead to the execution of <cbCallbackBlock>. C parameters passed in by the caller are passed on as LONG values to <cbCallbackBlock>. <cbCallbackBlock> must receive exactly the number of parameters that are passed and the calling convention specified in <nCallConvention> must match the calling convention expected by the caller. If the callback cannot be installed in memory, a SysError is thrown. In this case the string passed in <cErrorInformation> is shown as error text. If you don't want an error to be thrown in this case, use RequestCallback. A callback installed with Callback should be released with ReleaseCallback if it is not used any longer to free resources.
For more details about callbacks turn to Callbacks. Core Library: cckptcor.lib / cckptcor.dll Header: Callback.ch RequestCallback, ReleaseCallback
|