L_ContainerGetCallback

Summary

Gets the current user-installed callback function that is used to inform the user about container events.

Syntax

#include "LtCon.h"

L_LTCON_API L_INT L_ContainerGetCallback(pContainer, ppCallback, ppUserData)

Parameters

pCONTAINERHANDLE pContainer

Pointer to a container handle.

pCONTAINERCALLBACK * ppCallback

Pointer to the variable to be updated with the current user callback function address.

L_VOID ** ppUserData

Pointer to the variable to be updated with a pointer to the current user data.

Returns

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

Comments

If there is no user callback function currently installed, the function returns NULL for the ppCallback and ppUserData.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This function will determine if the container is installed or not.

L_BOOL ContainerGetCallbackExample(pCONTAINERHANDLE      pContainer, 
                                   pCONTAINERCALLBACK*   ppConCallback, 
                                   L_INT * nRet, 
                                   L_VOID **ppUserData) 
{ 
   *nRet = L_ContainerIsValid ( pContainer ); 
 
   if ( *nRet == SUCCESS  ) /* check the validity of container handle */ 
   { 
      /* get the container callback functoin pointer */ 
      *nRet = L_ContainerGetCallback ( pContainer, ppConCallback, ppUserData ) ; 
      if(*nRet != SUCCESS) 
         return FALSE; 
 
      if ( NULL != *ppConCallback )  
      { 
         return TRUE ; 
      } 
      else 
      { 
         return FALSE ; 
      } 
   } 
   else 
   { 
      return FALSE ; 
   } 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.