When writing multithreaded applications in the Windows Environment, you have two options for creating new threads: the C-runtime function _beginthread (and _beginthreadex) or the WIN32 API CreateThread(). If the thread is using C-Runtime functions (strcat, fopen, etc), use the beginthread approach. If the thread is created with the WIN32 API CreateThread() and uses C-Runtime functions, there will be a small memory leak when the thread is exiting.