G
#define chBEGINTHREADEX(psa, cbStack, pfnStartAddr, \
pvParam, fdwCreate, pdwThreadID) \
((HANDLE) _beginthreadex( \
(void *) (psa), \
(unsigned) (cbStack), \
(PTHREAD_START) (pfnStartAddr), \
(void *) (pvParam), \
(unsigned) (fdwCreate), \
(unsigned *) (pdwThreadID)))
ОбоснуйтеТолько в VC++ лучше вместо CreateThread использовать _beginthreadex
A thread in an executable that calls the C run-time library (CRT) should use the _beginthreadex and _endthreadex functions for thread management rather than CreateThread and ExitThread; this requires the use of the multi-threaded version of the CRT. If a thread created using CreateThread calls the CRT, the CRT may terminate the process in low-memory conditions.
Это связано с библиотекой C/C++. Подробности можно почитать здесь:Обоснуйте
А он что, не прав? Я ж не говорю, что CreateThread работать не будет. Просто лучше использовать именно _beginthreadex во избежание возможных проблем.Я так и думал, что основным аргументом будет книжка Рихтера
#define chBEGINTHREADEX(psa, cbStack, pfnStartAddr, \
pvParam, fdwCreate, pdwThreadID) \
((HANDLE) _beginthreadex( \
(void *) (psa), \
(unsigned) (cbStack), \
(PTHREAD_START) (pfnStartAddr), \
Взломай свой первый сервер и прокачай скилл — Начни игру на HackerLab