L_AutSetActiveContainer

#include "ltaut.h"

L_LTAUT_API L_INT L_AutSetActiveContainer(pAutomation, pContainer)

pAUTOMATIONHANDLE pAutomation;

pointer to an automation handle

pCONTAINERHANDLE pContainer;

pointer to a container handle

Sets the active automation container.

Parameter

Description

pAutomation

Pointer to an automation handle.

pContainer

Pointer to the container handle that references the container to be activated.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The container being set must exist in the automation container list. To add a container to the automation container list, call L_AutAddContainer.

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:

L_AutGetActiveContainer, L_AutAddContainer

Topics:

Automation and the Container

Example

This example shows how to set the automation active container.

L_INT AutSetActiveContainerExample(pAUTOMATIONHANDLE  pAutomation, 
pCONTAINERHANDLE   pContainer) 
{ 
   L_INT nRet; 
   nRet = L_AutIsValid ( pAutomation ); 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
   { 
      nRet = L_ContainerIsValid ( pContainer ); 
      if ( SUCCESS == nRet ) /* check the validity of the container handle */ 
      { 
         pCONTAINERHANDLE pActiveContainer ; 
         /* get the current active container */ 
         nRet = L_AutGetActiveContainer ( pAutomation, &pActiveContainer ) ; 
         if(nRet != SUCCESS) 
            return nRet; 
         if ( pContainer != pActiveContainer ) /* if the new container is not currently active */ 
         { 
            /* set the new active container */ 
            nRet = L_AutSetActiveContainer ( pAutomation, pContainer ) ; 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         return SUCCESS ; 
      } 
      else 
      { 
         return nRet ; 
      } 
   } 
   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