Share via


INDAdapter::Query Method

Retrieves the capabilities and limits of the Network Direct adapter.

Syntax

HRESULT Query(
  [in]             DWORD VersionRequested,
  [out, optional]  ND_ADAPTER_INFO *pInfo,
  [in, out]        SIZE_T *pBufferSize
);

Parameters

  • VersionRequested [in]
    The version of the ND_ADAPTER_INFO structure being requested. Must be set to 1.

  • pInfo [out, optional]
    An ND_ADAPTER_INFO structure that will contain the Network Direct adapter's information. May be NULL if pBufferSize is zero.

  • pBufferSize [in, out]
    The size, in bytes, of the pInfo buffer. If the buffer is too small to hold the information, the method fails with ND_BUFFER_OVERFLOW and sets this parameter to the required buffer size. If the buffer in too big on input, the method sets this parameter to the size used.

    If the adapter's vendor extends the adapter information that it provides, pBufferSize will be greater than the size of the ND_ADAPTER_INFO structure. The additional information is added to the end of the structure. Refer to the vendor's documentation for details regarding the additional information.

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 adapter information was retrieved.

ND_BUFFER_OVERFLOW

The pInfo buffer is not large enough to hold the adapter information—the buffer was not modified. The pBufferSize parameter is updated with the required buffer size.

 

Remarks

To determine the required buffer size, you can set pInfo to NULL and pBufferSize to zero. Then, call this method and use the returned pBufferSize to allocate the pInfo buffer.

The limits are provided by the Network Direct adapter hardware, which are independent of actual system resource limits such as available memory. The maximum limits reported may not be realized due to system load.

Getting the limits before creating an endpoint, completion queue, or defining memory will let you know if your application can run within the limits of hardware. You can also use the LargeRequestThreshold member of ND_ADAPTER_INFO to determine when Read and Write operations will yield better results than using Send and Receive.

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDAdapter

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010