CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_ErrorCode Async_CancelTask ( CPHASYNC const  hAsync)

Cancel an Async operation.

The async operation will be canceled, the related notification handler will be called with fSuccess at FALSE.

Parameters
[in]hAsyncHandle to the async operation.
Returns
Standard CHAILink Client return code. See CLC_ErrorCode enumeration.
Remarks
The CHAI checks pAsync validity before canceling the related async operation, so it is not an issue to pass an invalid pointer in case of bad hAsync handling in the application side (i.e. forget to reset the pointer at NULL on notification handler call)
Warning
This function can only be called in CopperLan context. This means in the pseudo task CPDoProcess(), in notification handlers or in asynchronous return handlers and not in SystemDoProcess() for instance.