Share via


INDConnector::GetLocalAddress Method

Retrieves the endpoint's address, which includes the endpoint's adapter address and port number. To succeed, the endpoint must be connected, or in the process of connecting.

Syntax

HRESULT GetLocalAddress(
  [out, optional]  struct sockaddr *pAddress,
  [in, out]        SIZE_T *pAddressLength
);

Parameters

  • pAddress [out, optional]
    A sockaddr buffer that will receive the local address. May be NULL if pAddressLength is zero.

  • pAddressLength [in, out]
    The size, in bytes, of the pAddress buffer. If the buffer is too small, the method fails with ND_BUFFER_OVERFLOW and sets this parameter to the required buffer size. If the buffer is too big, the method sets this parameter to the size used on output.

Return Value

When you implement this method, you should return the following return values. If you return others, try to use well-known values to aid in debugging issues.

Return code Description
ND_SUCCESS

The operation succeeded.

ND_BUFFER_OVERFLOW

The pAddress buffer is not large enough to hold the address—the buffer was not modified. The pAddressLength parameter is updated with the required buffer size.

ND_CONNECTION_INVALID

The endpoint is not connected, or not in the process of connecting.

 

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDConnector

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010