L_AutEnumContainers

#include "ltaut.h"

L_LTAUT_API L_INT L_AutEnumContainers(pAutomation, pEnumProc, pUserData )

pAUTOMATIONHANDLE pAutomation;

pointer to an automation handle

pAUTOMATIONENUMCONTAINERPROC pEnumProc ;

optional callback function

L_VOID *pUserData;

pointer to more parameters for the callback

Enumerates all containers associated with the specified automation handle.

Parameter

Description

pAutomation

Pointer to an automation handle.

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.

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

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

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:

AUTOMATIONENUMCONTAINERPROC

Topics:

Automation and the Container

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Container and Automation C API Help