L_AutEnumContainers

#include "ltaut.h"

L_LTAUT_API L_INT L_AutEnumContainers(pAutomation, pEnumProc, pUserData )

Enumerates all containers associated with the specified automation handle.

Parameters

pAUTOMATIONHANDLE pAutomation

Pointer to an automation handle.

pAUTOMATIONENUMCONTAINERPROC pEnumProc

Optional callback function for additional processing.If you do not provide a callback function, use NULL as the value of this parameter. If you do provide a callback function, use the function pointer as the value of this parameter. The callback function must adhere to the function prototype described in the AUTOMATIONENUMCONTAINERPROC Function.

L_VOID *pUserData

Void pointer that you can use to pass one or more additional parameters that the enumeration callback function needs.To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

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 AUTOMATIONENUMCONTAINERPROC callback function is called.

The enumeration process continues until the last container is enumerated or the callback function returns 0 or an error.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to enumerate the automation containers.

/* User defined enumeration callback function */ 
L_INT EXT_CALLBACK EnumContainersCallback (pCONTAINERHANDLE pContainer, 
                                           L_VOID*          pUserData ) 
{ 
   UNREFERENCED_PARAMETER(pUserData); 
 
   /* reset the passed container handle */ 
   L_ContainerReset ( pContainer ) ; 
 
   /* return SUCCESS to continue the enumeration */ 
   return SUCCESS ; 
} 
 
L_INT AutEnumContainersExample(pAUTOMATIONHANDLE pAutomation) 
{ 
   L_INT nRet; 
 
   nRet = L_AutIsValid ( pAutomation ); 
   if ( SUCCESS == nRet) /* check the validity of the automation handle */ 
   { 
      /* start enumerating the current added automation containers */ 
      nRet = L_AutEnumContainers ( pAutomation, EnumContainersCallback, NULL ); 
      if(nRet != SUCCESS) 
         return nRet; 
 
      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