Returns a pointer to a CSocket object.

static CSocket* PASCAL FromHandle(
   SOCKET hSocket 


Contains a handle to a socket.

A pointer to a CSocket object, or NULL if there is no CSocket object attached to hSocket.

When given a SOCKET handle, if a CSocket object is not attached to the handle, the member function returns NULL and does not create a temporary object.

For more information, see Windows Sockets: Using Sockets with Archives.

Header: afxsock.h

Community Additions