IEnumTASK::Next method (mmc.h)
The IEnumTASK::Next method enables MMC to retrieve the next task in the snap-in's list of tasks.
Syntax
HRESULT Next(
[in] ULONG celt,
[out] MMC_TASK *rgelt,
[out] ULONG *pceltFetched
);
Parameters
[in] celt
A value that specifies the number of tasks to provide. MMC always enumerates tasks one at a time; therefore, celt is always 1.
[out] rgelt
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.
[out] pceltFetched
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.
Return value
This method can return one of these values.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | mmc.h |