INDProvider::QueryAddressList Method

Retrieves a list of local addresses that the provider supports.

Syntax

HRESULT QueryAddressList(
  [in, out, optional]  SOCKET_ADDRESS_LIST *pAddressList,
  [in, out]            SIZE_T *pBufferSize
);

Parameters

  • pAddressList [in, out, optional]
    A list of addresses that the Network Direct adapters support. (For details of the list, see SOCKET_ADDRESS_LIST). May be NULL if pBufferSize is zero.

  • pBufferSize [in, out]
    The size, in bytes, of the pAddressList buffer. If the buffer is too small to hold the addresses, the method fails with ND_BUFFER_OVERFLOW and sets this parameter to the required buffer size. If the buffer in 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

All addresses supported by Network Direct adapters were returned in pAddressList.

ND_BUFFER_OVERFLOW

The pAddressList buffer is not large enough to hold the addresses—the buffer was not modified. The pBufferSize parameter is updated with the required buffer size.

 

Remarks

To determine the required buffer size, set pAddressList to NULL and pBufferSize to zero. Then, call this method and use the value returned in the pBufferSize parameter to allocate the pAddressList buffer. You should perform these calls in a loop because the size could change between calls.

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDProvider

INDProvider::OpenAdapter

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010