 |
MAPIReadMail ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The MAPIReadMail function retrieves a message for reading. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
ULONG FAR PASCAL MAPIReadMail(
LHANDLE lhSession,
ULONG ulUIParam,
LPTSTR lpszMessageID,
FLAGS flFlags,
ULONG ulReserved,
lpMapiMessage FAR * lppMessage
)
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER MAPIReadMail IN mapi32;
INTEGER lhSession,;
INTEGER ulUIParam,;
STRING lpszMessageID,;
INTEGER flFlags,;
INTEGER ulReserved,;
INTEGER @ lppMessage
|
 |
 |
 |
| Parameters: |
 |
lhSession
[in] Handle to a Simple MAPI session.
ulUIParam
[in] Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal.
lpszMessageID
[in] Pointer to a message identifier string for the message to be read.
flFlags
[in] Bitmask of option flags.
ulReserved
Reserved; must be zero.
lppMessage
[out] Pointer to the location where the message is written. |
 |
 |
| Return value: |
 |
| SUCCESS_SUCCESS (0) or an error code. |
 |
 |
| Usage: |
 |
LOCAL lnResult, lnMemPtr
lnMemPtr = 0
lnResult = MAPIReadMail(hSession, 0, lcMsgId,;
MAPI_PEEK+MAPI_SUPPRESS_ATTACH, 0,;
@lnMemPtr)
IF lnResult = SUCCESS_SUCCESS
* process the message specified by the pointer
* ...
= MAPIFreeBuffer(lnMemPtr)
ENDIF
|
 |
 |
| My comment: |
 |
Before calling MAPIReadMail, use the MAPIFindNext function to verify that the message to be read is the one you want to be read.
Messages are written to a MapiMessage structure which can be freed with a single call to the MAPIFreeBuffer function. |
 |
 |
| Word Index links for the MAPIReadMail : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-01-29 20:41:16 | | Modified: | 2007-06-11 22:12:57 | Visited in last 7 days: 12 |