Поделиться через


CSocket::FromHandle

Returns a pointer to a CSocket object.

static CSocket* PASCAL FromHandle(
   SOCKET hSocket 
);

Параметры

  • 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

См. также

Основные понятия

CSocket Class

CSocket Members

Hierarchy Chart

CAsyncSocket::FromHandle