WPUCloseSocketHandle

The WPUCloseSocketHandle function closes an existing socket handle.

int WPUCloseSocketHandle (
  SOCKET s,      
  LPINT lpErrno  
);
 

Parameters

s
[in] A handle to socket created with WPUCreateSocketHandle.
lpErrno
[out] A pointer to the error code.

Remarks

Th WPUCloseSocketHandle function closes an existing socket handle created by WPUCreateSocketHandle. This function removes the socket from WS2_32.DLL's internal socket table. The owning service provider is responsible for releasing any resources associated with the socket.

Return Values

If no error occurs, WPUCreateSocketHandle returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code is available in lpErrno.

Error Codes

WSAENOTSOCK The descriptor is not a socket created by WPUCreateSocketHandle.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in ws2spi.h.

See Also

WPUCreateSocketHandle