MgmGroupEnumerationGetNext function (mgm.h)
The MgmGroupEnumerationGetNext function retrieves the next set of group entries. The information that is returned by this function is a list of groups joined and the sources requested, if any.
The groups are not returned in any particular order.
DWORD MgmGroupEnumerationGetNext( HANDLE hEnum, PDWORD pdwBufferSize, PBYTE pbBuffer, PDWORD pdwNumEntries );
Handle to the enumeration that was obtained from a previous call to MgmGroupEnumerationStart.
On input, pdwBufferSize is a pointer to a DWORD-sized memory location that contains the size, in bytes, of the buffer pointed to by pbBuffer.
On output, if the return value is ERROR_INSUFFICIENT_BUFFER, pdwBufferSize receives the minimum size that the buffer pointed to by pbBuffer must be to hold a group entry; otherwise the value of pdwBufferSize remains unchanged.
On input, the client must supply a pointer to a buffer.
On output, pbBuffer contains one or more group entries. Each group entry is a SOURCE_GROUP_ENTRY structure.
On input, the client must supply a pointer to a DWORD value.
On output, pdwNumEntries receives the number of groups in pbBuffer.
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
||Could not complete the call to this function.|
||The specified buffer is too small to hold even one group. The client should check the value of pdwBufferSize for the minimum buffer size required to retrieve one group.|
||Invalid handle to an enumeration.|
||More groups are available.|
||No more groups are available. Zero or more groups were returned; check the value of pdwNumEntries to verify how many groups were returned.|
||Not enough memory to complete this operation.|
|Minimum supported client||None supported|
|Minimum supported server||Windows 2000 Server [desktop apps only]|