Frees the automation handle.
#include "ltaut.h"
L_LTAUT_API L_INT L_AutFree(pAutomation)
Pointer to the automation handle to free.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
This function should be called when an automation handle is no longer needed by an application.
This example frees the automation handle and its associated toolbar (if one exists).
L_INT AutFreeExample(pAUTOMATIONHANDLE pAutomation){L_INT nRet;nRet = L_AutIsValid ( pAutomation );if ( SUCCESS == nRet ) /* check the validity of the automation handle */{pTOOLBARHANDLE pToolbar ;/* get the automation toolbar handle */nRet = L_AutGetToolbar ( pAutomation, &pToolbar ) ;if(nRet != SUCCESS)return nRet;if ( NULL != pToolbar ) /* check if there is any toolbar is currently installed */{/* free the toolbar handle */L_TBFree ( pToolbar ) ;}pCONTAINERHANDLE pContainer = NULL;L_AutGetActiveContainer (pAutomation, &pContainer);if(pContainer != NULL){L_AutRemoveContainer(pAutomation, pContainer);L_ContainerFree(pContainer);}/* free the automation handle */L_AutFree ( pAutomation ) ;return SUCCESS ;}else{return nRet ;}}