L_AutFree

#include "ltaut.h"

L_LTAUT_API L_INT L_AutFree(pAutomation)

Frees the automation handle.

Parameters

pAUTOMATIONHANDLE pAutomation

Pointer to the automation handle to free.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function should be called when an automation handle is no longer needed by an application.

Required DLLs and Libraries

See Also

Functions

Topics

Example

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 ; 
   } 
} 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C API Help