WindowsApi: beginthread
lastmod 2026-11-10created 2016-04-062 edits
_beginthread is a function in the Windows C runtime (CRT) that creates a new thread. It takes a thread start function, a stack size, and an argument pointer, and returns a thread handle. Because it initializes the CRT's internal state per thread, it is recommended to create threads that use C runtime functions with this function instead of CreateThread. It differs from _beginthreadex in that the handle is closed automatically when the thread ends, so it cannot be used for synchronization.