In continuation of Nero API…
Windows IMAPI is much more convenient to use, it is built on COM, it is “more Windows” etc, however there was an issue even there.
Normally IEnumXXX::Next enumerator method accepts third parameter NULL since if we are getting items one by one, we are fine processing return code S_OK/S_FALSE and we don’t need extra parameter pceltFetched to get us number of fetched items. It is ok to pass NULL in most cases, not with IMAPI enumerators however – they require a valid pointer.