Hi all, The CreateThread is defined here: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread
YOU MUST NOT USE unsigned long, BECAUSE THE VARIABLE SIZE IS UNDEFINED across compilers! void StartTimerLoop(TimerCallback_t _init_callback) { unsigned long timer_thread_id; stop_timer = 0; init_callback = _init_callback; EnterMutex(); // At first, TimeDispatch will call init_callback. SetAlarm(NULL, 0, init_callback, 0, 0); LeaveMutex(); timer_thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TimerThreadLoop, NULL, 0, &timer_thread_id); SetThreadPriority(timer_thread, THREAD_PRIORITY_HIGHEST); // JFO: Make timer thread wit highest priority. } The proposed fix is to use DWORD. This type is standard in Windows. DWORD timer_thread_id; best regards Jara _______________________________________________ Canfestival-devel mailing list Canfestival-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/canfestival-devel