return value - Understanding the MSDN _beginthreadex function example -


there's function on _beginthreadex msdn page:

unsigned __stdcall secondthreadfunc( void* parguments ) {     printf( "in second thread...\n" );      while ( counter < 1000000 )     counter++;      _endthreadex( 0 );     return 0; } 

i know can value returned _endthreadex function getexitcodethread, how value returned return?

another question: doesn't _endthreadex end thread, why did put return 0 after that?

return 0 there make compiler happy. _endthreadex not return.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -