Export (0) Print
Expand All
Expand Minimize

WPUCloseSocketHandle function

The WPUCloseSocketHandle function closes an existing socket handle.

Syntax


int WPUCloseSocketHandle(
  _In_   SOCKET s,
  _Out_  LPINT lpErrno
);

Parameters

s [in]

Handle to socket created with WPUCreateSocketHandle.

lpErrno [out]

Pointer to the error code.

Return value

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

Error codeMeaning
WSAENOTSOCK

The descriptor is not a socket created by WPUCreateSocketHandle.

 

Remarks

The 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ws2spi.h

See also

WPUCreateSocketHandle

 

 

Community Additions

ADD
Show:
© 2014 Microsoft