Although it is a common pattern for an enumerator to return S_FALSE it is not a requirement. There are other instances besides IEnumExplorerCommand (e.g., IEnumAssocHandlers, IEnumResources) that are documented to deviate from the pattern.
IEnumExplorerCommand::Next return values
Kai
6
Reputation points
Hello,
I want to implement the IEnumExplorerCommand interface to provide a custom entry in the explorer context menu.
Sccording to the documentation IEnumExplorerCommand::Next returns S_OK if the method returns, regardless of whether the specified number of elements could be fetched or not.
Other IEnum*::Next methods return S_OK only if the full count of requested items are successfully retrieved, and S_FALSE if more items were requested than remained in the enumeration.
Shouldn't this also be the case for IEnumExplorerCommand ?