CSocket::FromHandle

static CSocket* PASCAL FromHandle( SOCKET hSocket );

Return Value

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

Parameters

hSocket

Contains a handle to a socket.

Remarks

Returns a pointer to a CSocket object. 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 and related articles in Visual C++ Programmer’s Guide. Also see Windows Sockets Programming Considerations in the Win32 SDK documentation.

CSocket OverviewClass MembersHierarchy Chart

See Also   CAsyncSocket::FromHandle