#include "ltaut.h"
L_LTAUT_API L_INT L_AutFree(pAutomation)
pAUTOMATIONHANDLE pAutomation; |
pointer to an automation handle |
Frees the automation handle.
Parameter |
Description |
pAutomation |
Pointer to the automation handle to free. |
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.
Required DLLs and Libraries
LTAUT For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Functions: |
|
Topics: |
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 ;
}
}