次の方法で共有


WPUCloseSocketHandle (Compact 2013)

3/26/2014

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

See Also

Reference

Winsock SPI Functions
WPUCreateSocketHandle