IEnumTASK::Next method (mmc.h)
The IEnumTASK::Next method enables MMC to retrieve the next task in the snap-in's list of tasks.
HRESULT Next( ULONG celt, MMC_TASK *rgelt, ULONG *pceltFetched );
A value that specifies the number of tasks to provide. MMC always enumerates tasks one at a time; therefore, celt is always 1.
A pointer to an MMC_TASK structure that the snap-in fills in to represent the task to add to the taskpad. Be aware that the caller (MMC) allocates the memory for the structure.
A pointer to a value that specifies the number of tasks returned. If the snap-in successfully returned one or more tasks, set the value to the number of tasks that were successfully returned. Because MMC always requests one task at a time (celt is always 1), pceltFetched should be set to 1 if the task was successfully returned. If the snap-in has no more tasks in its list, or if the snap-in fails to fill in the MMC_TASK structure, set the value to 0.
This method can return one of these values.
MMC calls this method to enumerate the list of tasks that the snap-in must add to the taskpad. MMC calls this method until it returns S_FALSE to indicate there are no more tasks for the snap-in to add to the taskpad.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|