MgmGetNextMfe function (mgm.h)

The MgmGetNextMfe function retrieves one or more MFEs. The routing table manager starts retrieving MFEs starting with the MFE that follows the specified MFE. The function can retrieve zero, one, or more MFEs. The number of MFEs returned depends on the size of the MFEs and the size of the buffer supplied by the client when the function is called.

The data returned in the buffer is ordered first by group, and then by the sources within a group.

Syntax

DWORD MgmGetNextMfe(
  [in]      PMIB_IPMCAST_MFE pimmStart,
  [in, out] PDWORD           pdwBufferSize,
  [in, out] PBYTE            pbBuffer,
  [in, out] PDWORD           pdwNumEntries
);

Parameters

[in] pimmStart

Pointer to a MIB_IPMCAST_MFE structure that specifies from where to begin retrieving MFEs. The dwSource and dwGroup members of the MIB_IPMCAST_MFE structure identify an MFE. Specify the source and group of the last MFE that was returned by the previous call to MgmGetFirstMfe or MgmGetNextMfe.

[in, out] pdwBufferSize

On input, pdwBufferSize is a pointer to a DWORD-sized memory location containing the size, in bytes, of pbBuffer.

On output, if the return value is ERROR_INSUFFICIENT_BUFFER, pdwBufferSize receives the minimum size pbBuffer must be to hold the MFE; otherwise, the value of pdwBufferSize remains unchanged.

[in, out] pbBuffer

On input, the client must supply a pointer to a buffer.

On output, pbBuffer contains one or more MFEs. Each MFE is a MIB_IPMCAST_MFE structure.

[in, out] pdwNumEntries

On input, the client must supply a pointer to a DWORD-sized memory location.

On output, pdwNumEntries receives the number of MFEs contained in pbBuffer.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_CAN_NOT_COMPLETE
Could not complete the call to this function.
ERROR_INSUFFICIENT_BUFFER
The specified buffer is too small for even one MFE. The client should check the value of pdwBufferSize for the minimum buffer size required to retrieve one MFE.
ERROR_MORE_DATA
More MFEs are available.
ERROR_NO_MORE_ITEMS
No more MFEs are available. Zero or more MFEs were returned; check the value of pdwNumEntries to verify how many MFEs were returned.

Remarks

This function is used to continue the sequential retrieval of MFEs; use MgmGetFirstMfe to start the retrieval process.

In general, to retrieve MFEs, first call MgmGetFirstMfe. Then, call MgmGetNextMfe one or more times, until there are no more MFEs to return. Each call to MgmGetNextMfe should begin after the last MFE returned by the previous call to MgmGetNextMfe (or the initial call to MgmGetFirstMfe). To do this, the client specifies the last source and group in the buffer returned by a previous call.

Note  The minimum size of the buffer pointed to by pbBuffer is not fixed; it is different for each MFE. Use the sizeof(MIB_IPMCAST_MFE) macro to determine the size of each MFE returned in the buffer.
 

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mgm.h
Library Rtm.lib
DLL Rtm.dll

See also

MIB_IPMCAST_MFE

MgmGetFirstMfe

MgmGetMfe