This does not compile for me. The local thread variable is just a HANDLE, so there is no access to the started variable in the WINPR_THREAD structure. The structure definition of WINPR_THREAD is also private and not directly available to the tsmf module. The best solution is probably to create a new method in winpr to access the internal variables of the thread structure and get at the started variable so that it can be returned to the caller.