DitsPutActEndRoutine - Put a routine to be invoked when the action completes.

Function

Put a routine to be invoked when the action completes.

Description

This function inserts a function which will be invoked whenever the invoking action completes. This allows the action to catch cases where it completing regardless of why it is completing.

The action end routine is cleared when the action starts, so must be inserted afresh on each invocation of the action.

The action end routine is called after any bulk data has tidyed up but before any remaining ERS messages are flushed (so they can be annuled or added to) and before the action completion message is returned.

The completion of the action would have already been logged if a logging system is active.

Language

C

Call

(void) = DitsPutActEndRoutine(routine,client_data, old_routine,old_c_data,status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>routineDitsActEndRoutineTypeThe new action end routine. See Dits documentation for details.
>client_dataVoid *Passed directly to the routine as its client_data argument.
!old_routineDitsActEndRoutineType *If non-null, return the previous action end routine address here. This address may be null.
!old_c_dataVoid **If non-null, return the previous action end routine client data here.
!statusStatusType *Modified status.

Function Prototypes Used

typedef DVOID (*DitsActEndRoutineType)( DVOIDP client_data, int taskExit, StatusType exitStatus, StatusType *status);

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>client_datavoid *The value passed to DitsPutActEndRoutine().
>taskExitintSet to true (1) if the task is exiting.
>exitStatusStatusTypeThe action exit status.
!statusStatusType *Modified status.

Include files

DitsSys.h

External functions used

None

External values used

DitsTask

Prior requirements

Can only be called from a Dits application routine.

See Also

The Dits Specification Document.

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tony.farrell@mq.edu.au