Home page  
Help >
ddlCancelCallback() - post cancel callback
Version 7.11
ddlCancelCallback() - post cancel callback ddlCancelCallback() - post cancel callback

Prototype:
   void ddlCancelCallback(
      CONTROL *ctl,
      WtCastPtr UserWord,
      CancelRtn UserCancel);
 
      typedef int (STDCALL *CancelRtn)(
         WtCastPtr UserWord);          /* [IN] UserWord from ddlCancelCallback() */
Description:
Posts a callback to be used with subsequent calls to several Thunderbolt API functions. This callback allows an application to flag Thunderbolt to terminate a command prematurely. When this occurs, the function returns with a status [i.e., ctl.Status] which is defined symbolically as EC_CANCEL in ddl_incl.h.

The affected functions are the functions that may take a prolonged period of time to complete; and/or functions that generate a large amount of print output.

If the CancelCallback is non-null, these functions call it periodically; if the CancelCallback returns zero, the API function continues; if the CancelCallback returns non-zero, the API function terminates the function gracefully, and returns with the EC_CANCEL status.

The Thunderbolt API functions that may call the CancelCallback are:
    ddlChange()
    ddlCompileAI()
    ddlCompileDBD()
    ddlConstruct()
    ddlDelete()
    ddlDestruct()
    ddlFind()
    ddlInfo()
    ddlLoad()
    ddlMatch()
    ddlRelate()
    ddlSort()
    ddlStructure()
    ddlSuperMatch()
    ddlTally() 
    ddlUnload()
    ddlWrite()
Values returned in Control Structure:
Control.Ans1 NA
Control.Ans2 Previous Cancel Callback pointer (cast as 32 bit int)
Control.Ans3 Previous Cancel Callback UserWord (cast as 32 bit int)
Control.Ans2L Previous Cancel Callback pointer (cast as 64 bit int)
Control.Ans3L Previous Cancel Callback UserWord (cast as 64 bit int)

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.