Freigeben über


CAsyncSocket::FromHandle

Returns a pointer to a CAsyncSocket object.

static CAsyncSocket* PASCAL FromHandle(
   SOCKET hSocket 
);

Parameters

  • hSocket
    Contains a handle to a socket.

Return Value

A pointer to an CAsyncSocket object, or NULL if there is no CAsyncSocket object attached to hSocket.

Remarks

When given a SOCKET handle, if a CAsyncSocket object is not attached to the handle, the member function returns NULL.

Requirements

Header: afxsock.h

See Also

Concepts

CAsyncSocket Class

CAsyncSocket Members

Hierarchy Chart

CSocket::FromHandle

CAsyncSocket::Attach

CAsyncSocket::Detach