Gets the current user-installed callback function that is used to inform the user about container events.
#include "LtCon.h"
L_LTCON_API L_INT L_ContainerGetCallback(pContainer, ppCallback, ppUserData)
Pointer to a container handle.
Pointer to the variable to be updated with the current user callback function address.
Pointer to the variable to be updated with a pointer to the current user data.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
If there is no user callback function currently installed, the function returns NULL for the ppCallback and ppUserData.
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 ;
}
}