RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
260910 How to obtain the latest Windows 2000 service pack
A new sockets IOCTL called "SIO_UDP_CONNRESET" has
been introduced in Windows 2000. When this IOCTL is used, the program must be
rewritten specifically for Windows 2000 to obtain the original Windows NT 4.0
behavior. Windows NT 4.0, Microsoft Windows 95, and Microsoft Windows 98 have
no support for this new IOCTL. In addition to rewriting your application, you
will need the hotfix referenced further down in this article.
The
following code snippet demonstrates a technique that can be used to call
WSAIoctl with the SIO_UDP_CONNRESET control code to obtain the original Windows
NT 4.0 behavior.
DWORDdwBytesReturned = 0;
BOOLbNewBehavior = FALSE;
DWORDstatus;
// disable new behavior using
// IOCTL: SIO_UDP_CONNRESET
status = WSAIoctl(sd, SIO_UDP_CONNRESET,
&bNewBehavior, sizeof(bNewBehavior),
NULL, 0, &dwBytesReturned,
NULL, NULL);
if (SOCKET_ERROR == status)
{
DWORD dwErr = WSAGetLastError();
if (WSAEWOULDBLOCK == dwErr)
{
// nothing to do
return(FALSE);
}
else
{
printf("WSAIoctl(SIO_UDP_CONNRESET) Error: %d\n", dwErr);
return(FALSE);
}
}
To be able to compile this code, you need either to have the latest
Mswsock.h which includes the definition of SIO_UDP_CONNRESET or to insert below
definition of it directly into your code.
// MS Transport Provider IOCTL to control
// reporting PORT_UNREACHABLE messages
// on UDP sockets via recv/WSARecv/etc.
// Path TRUE in input buffer to enable (default if supported),
// FALSE to disable.
#defineSIO_UDP_CONNRESET_WSAIOW(IOC_VENDOR,12)
Note The hotfix that is described in this article will not resolve
the problem unless the program is rewritten to use the new SIO_UDP_CONNRESET
IOCTL.
In order to compile this code, it is necessary to have the
latest Platform SDK installed on your computer. This is available from the
following MSDN Web site: