_try
{
listen(sockfd,5); //listen会产生一个There are no more endpoints available from the endpoint mapper.异常
}
_except( EXCEPTION_EXECUTE_HANDLER )
{
printf( "Caught the exception in main()\n" );
}
现在问题是_try,_except结构根本捕获不到任何异常,程序运行提示:
Unhandled exception at 0x7c812afb in st_thread.exe: 0x000006D9: There are no more endpoints available from the endpoint mapper.
在微软介绍里面找到的
引:To resolve this issue, set the Windows Firewall Service to Automatic, and then start the service.
http://support.microsoft.com/kb/KbView/2123653