IFWXNetworkSocket::GetSockName method

Applies to: desktop apps only

The GetSockName method retrieves the local name of a socket. This method is similar to the Winsock getsockname function.

Syntax

HRESULT GetSockName(
  [out]  LPSOCKADDR Address,
  [out]  LPINT AddressLength
);

Parameters

  • Address [out]
    Pointer to a sockaddr structure that receives the socket address (name).

  • AddressLength [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 value

This method can return one of these values.

  • S_OK
    The method succeeded.

  • HRESULT_FROM_WIN32(WSAEINVAL)
    The socket has not been bound to an address using the Bind method.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

Header

Wspfwext.idl

DLL

Wspsrv.exe

See also

IFWXNetworkSocket

 

 

Build date: 7/12/2010