LAutomation::Free

#include "ltwrappr.h"

L_INT LAutomation::Free(void);

Frees the automation handle.

Returns

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

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

See Also

Functions:

LAutomation::Initialize, LAutomation::IsValid

Topics:

Initializing, Creating and Freeing Automation Handles

Example

This example frees the automation handle and its associated toolbar (if one exists).

L_INT LAutomation_FreeExample(LAutomation &lauto) 
{ 
   L_INT nRet; 
   nRet = lauto.IsValid(); 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
   { 
      LToolbar *pToolbar; 
      /* get the automation toolbar handle */ 
      pToolbar = lauto.GetToolbar () ; 
      if ( NULL != pToolbar ) /* check if there is any toolbar is currently installed */ 
      { 
         /* free the toolbar handle */ 
         nRet = pToolbar->Free () ; 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
      /* free the automation handle */ 
      nRet = lauto.Free () ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
   else 
   { 
      return nRet ; 
   } 
   return SUCCESS ; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Container and Automation C++ Class Library Help