LAutomation::EnumContainers

#include "ltwrappr.h"

L_INT LAutomation::EnumContainers (void )

Enumerates all containers associated with the automation object.

Returns

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

Comments

For each container enumerated by this function, the LAutomation::EnumContainersCallBack function is called.

The enumeration process continues until the last container is enumerated or an error occurs.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to enumerate the automation containers.

class LUserAutomation :public LAutomation 
 
{ 
 
protected : 
 
     virtual L_INT EnumContainersCallback (LContainer* pLContainer); 
 
}; 
 
//LAutomation::EnumContainers (void) 
 
 
 
/* User defined enum callback function */ 
 
L_INT LUserAutomation::EnumContainersCallback (LContainer* pLContainer) 
{ 
 
   /* reset the passed container handle */ 
 
   pLContainer ->Reset () ; 
 
   /* return 1 to continue the enumeration */ 
 
   return 1 ; 
 
} 
 
L_INT LAutomation_EnumContainersExample( LAutomation &Automation ) 
{ 
   L_INT nRet; 
 
   nRet = Automation.IsValid (); 
 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
 
   { 
 
      /* start enum the current added automation containers */ 
 
      nRet = Automation.EnumContainers (); 
      if(nRet != SUCCESS) 
         return nRet; 
 
   } 
 
   else 
 
   { 
 
      return nRet ; 
 
   } 
 
   return SUCCESS; 
} 

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++ Class Library Help