Microsoft Internet Security and Acceleration Server 2000

IFWXNetworkSocket::GetSockName Method

Gets the local address of a socket.

HRESULT GetSockName(
  LPSOCKADDR Address,
  LPINT AddressLength
);

Parameters

Address
[out] Pointer to a Winsock sockaddr structure that receives the socket address (name).
AddressLength
[in, out] On input, specifies the size, in bytes, of the Address buffer. On output, receives the buffer size, in bytes, needed to hold the address.

Return Values

S_OK
The method succeeded.
HRESULT_FROM_WIN32(WSAEFAULT)
The name or the namelen parameter is not a valid part of the user address space, or the namelen parameter is too small.
HRESULT_FROM_WIN32(WSAEINVAL)
The socket has not been bound to an address with bind.

Remarks

This method is similar to the Winsock getsockname function, which is described in MSDN.