I looked at the doc https://www.freepascal.org/docs-html/rtl/system/getcurrentthreadid.html https://www.freepascal.org/docs-html/rtl/system/threadid.html But the entry for ThreadId only says "Current Thread ID." Which is not distinguishing it from GetCurrentThreadId. So what is the difference?