windowssocketserror-handlingmfcwindows-server-2012

Is it possible to suppress or redirect Windows Socket Notification Sink errors?


My search for a resolution on this issue resulted only in this link Stack Overflow Link which discusses what causes the Socket Notification Sink error.

I have an application in Win2003/Win2019 using MFC where when this issue occurs I get from 1 to 300 "Socket Notification Sink" dialog boxes that must be individually dismissed before recovery can begin.

I am looking for any techniques to close these up to 300 dialog boxes via a command line command, or program code.


Solution

  • I think this is what you're looking for:

    Windows has a registry setting called error mode that controls how the system presents errors to the user. You can use it to have the system skip popping up the dialog box and instead write the information to the event log.

    See my answer to this question.

    You can also set ErrorMode for your program in code using the SetErrorMode API.

    This affects only your program.