有谁知道这是什么意思?什么原因造成的呢?

解决方案 »

  1.   

    In my experience, this error can be generated by utilizing sockets in secondary threads and is more commonly seen in threads invoked by applications running as Window's services.  This error is typically generated by the secondary thread when creating or attaching socket handles to a socket class object while more than one process is engaging in network communications at the same time.More specifically, the "Socket Notification Sink" error actually relates to a failed window creation for use by a MFC socket class object.  Since the MFC socket classes actually create and utilize a window to control the MFC socket object, failure to generate this window results in a detrimental application error.  This windows generation failure is more commonly seen in Window's services since they typically have restricted UI creation rights (even if the service has the "interact with desktop" attribute). 
      

  2.   

    RESOLUTION:1。Rewrite the application/thread/service so that it only opens a socket at the beginning of execution.  The more times you create or even bind a socket, the greater the chance you will have of generating this error.2。Rewrite the application to utilize the socket layer directly and remove all instances of the MFC derived socket classes. 
      

  3.   

    自己重写了一个类,不过这种情况很难预料什么时候会出现,mfc的socket类实现在多线程情况下真的不是很好
      

  4.   

    我也遇到过,我觉得是当SOCKET已经建立连接,此时如果没有主要的关闭SOCKET,就关闭应用程序而引起的,解决的办法是关闭程序前关闭所有的SOCKETTCP连接