This looks like a bug to me, but the MSDN looks a little ambiguous to me.
I found some code that does this:
According to the MSDN:
HANDLE hTcpResponder = CreateThread( NULL, 0, TcpResponder, &ServiceInfo, 0, &TcpResponderId );
if ( hTcpResponder == NULL )
emsg( SPNorm, "New Tcp Responder Did not Start" );
CloseHandle( hTcpResponder );
Does that mean that you should close the handle AFTER the thread has finished, or can you close it while the thread is still running and then you don't have to worry about when the thread finishes?
Originally Posted by MSDN
I thought closing the handle would end the thread?