Share via


GetSockName Method of the IFWXNetworkSocket Interface

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
    Pointer to a sockaddr structure that receives the socket address (name).

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

  • S_OK
    The method succeeded.

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

Requirements

Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXNetworkSocket

Send comments about this topic to Microsoft

Build date: 6/30/2010