The type of handle that is passed to a callback function depends of the type of the callback.
For these types the handle parameter is a session handle. You can safely typecast the handle parameter to a pCTDBSESSION structure pointer. Please refer to the ctdbsdk.h header file for the declaration of CTDBSESSION structure.
For these types the handle parameter is a database handle. You can safely typecast the handle parameter to a pCTDBDATABASE structure pointer. Please refer to the ctdbsdk.h header file for the declaration of CTDBDATABASE structure.
For these types the handle parameter is a table handle. You can safely typecast the handle parameter to a pCTDBTABLE structure pointer. Please refer to the ctdbsdk.h header file for the declaration of CTDBTABLE structure.
For these types the handle parameter is a record handle. You can safely typecast the handle parameter to a pCTDBRECORD structure pointer. Please refer to the ctdbsdk.h header file for the declaration of CTDBRECORD structure.