Share via


WPUCloseSocketHandle (Windows Embedded CE 6.0)

1/6/2010

This function closes an existing socket handle.

Syntax

int WPUCloseSocketHandle(
  SOCKET s,
  LPINT lpErrno 
);

Parameters

  • lpErrno
    [out] Pointer to the error code.

Return Value

If successful, WPUCloseSocketHandle returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code is available in lpErrno.

Error value Description

WSAENOTSOCK

Descriptor is not a socket created by WPUCreateSocketHandle.

Remarks

This function closes an existing socket handle created by WPUCreateSocketHandle and removes the socket from the internal socket table of Ws2.dll. The owning service provider is responsible for releasing any resources associated with the socket.

Requirements

Header ws2spi.h
Library Ws2.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Winsock SPI Functions
WPUCreateSocketHandle