Thank you for your quick response.
But, would this be the right way of killing my thread from the callback function that created it in the first place:
CmtGetThreadPoolFunctionAttribute(Pool_Handle, threadFunctionID, ATTR_TP_FUNCTION_THREAD_ID, &threadID);
CmtTerminateThreadPoolThread (Pool_Handle, threadID, 0);
CmtDiscardThreadPool (Pool_Handle);
QuitUserInterface(0);
?
Thanks,
JP