Group: Simple MAPI - Library: mapi32
The MAPIFindNext function retrieves the next (or first) message identifier of a specified type of incoming message.
How to read email messages using Simple MAPI
ULONG FAR PASCAL MAPIFindNext(
LHANDLE lhSession,
ULONG ulUIParam,
LPTSTR lpszMessageType,
LPTSTR lpszSeedMessageID,
FLAGS flFlags,
ULONG ulReserved,
LPTSTR lpszMessageID
) DECLARE INTEGER MAPIFindNext IN mapi32;
INTEGER lhSession,;
INTEGER ulUIParam,;
STRING lpszMsgType,;
STRING lpszSeedMsgID,;
INTEGER flFlags,;
INTEGER ulReserved,;
STRING @ lpszMsgID lhSession [in] Session handle that represents a Simple MAPI session.
ulUIParam [in] Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal.
lpszMessageType [in] Pointer to a string identifying the message class to search.
lpszSeedMessageID [in] Pointer to a string containing the message identifier seed for the request.
flFlags [in] Bitmask of option flags.
ulReserved Reserved; must be zero.
lpszMessageID [out] Pointer to the returned message identifier.
SUCCESS_SUCCESS (0) or an error code.
There is no MAPIFindFirst function.
When the lpszSeedMessageID parameter is NULL or points to an empty string, MAPIFindNext returns the message identifier for the first message of the type specified by the lpszMessageType parameter.
Repeated calls to MAPIFindNext ultimately result in a return of the MAPI_E_NO_MESSAGES value, which means the enumeration is complete.
Home