Microsoft KB Archive/319952

= getsockname returns error 10038 (WSAENOTSOCK) on a duplicated socket =

Article ID: 319952

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q319952



SYMPTOMS
When you call Getsockname on a duplicated socket, the call may not succeed and you may receive error 10038 (WSAENOTSOCK).

This problem occurs when the following conditions exist:
 * If the socket handle is duplicated using DuplicateHandle.
 * The socket is bound and listening on the loopback address 127.0.0.1.
 * The network cable is unplugged.
 * Microsoft Proxy Client is installed.



RESOLUTION
To resolve the problem, use the WSADuplicateSocket call to share a socket between processes.

Keywords: kbdswnet2003swept kbapi kbfix kbnetwork kbprb kbwinsock KB319952

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.