LAutomation::EnumContainers

#include "ltwrappr.h"

L_INT LAutomation::EnumContainers (void )

Enumerates all containers associated with the automation object.

Returns

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

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::EnumContainersCallBack

Topics:

Automation and the Container

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