This function returns the thread context for the current thread.
CciThreadContext *cniGetThreadContext(
int *returnCode,
CciMessageContext *msgContext);
If this function is successful, it returns a handle to the CciThreadContext for the current thread.
The cciMessageContext value must correspond to a cciMessage, where the cciMessage is passed in to the cniEvaluate or cniRun function on the current thread.
CciMessageContext* messageContext = cniGetMessageContext(NULL,message);
CciThreadContext* threadContext = cniGetThreadContext(NULL,messageContext);