CSocket::FromHandle

Call this member function to obtain a pointer to a CSocket object, when you have a SOCKET handle. If a CSocket object is not attached to the handle passed in the hSocket parameter, this function returns NULL. It does not create a temporary object.

Syntax

static CSocket* PASCAL FromHandle( SOCKET hSocket );

At a Glance

Header file: Afxsock.h
Platforms:
Versions: 2.0 and later
Complete documentation Visual C++ documentation

See Also

CSocket Overview, CSocket Member Functions, Windows Sockets Classes, CAsyncSocket::FromHandle