Annotation of mstools/samples/mapi/mapi.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  *  m a p i . h
                      3:  *    
                      4:  *  Messaging Applications Programming Interface.
                      5:  *    
                      6:  *  Copyright (c) 1992, Microsoft Corporation.  All rights reserved.
                      7:  *    
                      8:  *  Purpose:
                      9:  *    This file defines the structures and constants used by
                     10:  *    that subset of the messaging applications programming
                     11:  *    interface which will be supported under Windows by
                     12:  *    Microsoft Mail for PC Networks vesion 3.0.
                     13:  */
                     14: 
                     15: 
                     16: 
                     17: /*
                     18:  *  Types.
                     19:  */
                     20: 
                     21: #ifdef __cplusplus
                     22: extern "C" {
                     23: #endif
                     24: 
                     25: typedef unsigned long       ULONG;
                     26: typedef unsigned long FAR * LPULONG;
                     27: typedef unsigned long       FLAGS;
                     28: typedef unsigned long          LHANDLE, FAR *LPLHANDLE;
                     29: #define lhSessionNull   ((LHANDLE)0)
                     30: 
                     31: 
                     32: #define MAPI_MESSAGEID_LENGTH   64
                     33: 
                     34: typedef struct
                     35:   {
                     36:     ULONG ulReserved;    // Reserved for future use (must be 0)
                     37:        ULONG flFlags;           // Flags
                     38:     ULONG nPosition;     // character in text to be replaced by attachment
                     39:     LPSTR lpszPathName;  // Full path name of attachment file
                     40:     LPSTR lpszFileName;  // Original file name (optional)
                     41:     LPVOID  UNALIGNED lpFileType;   // Attachment file type (optional)
                     42:   } UNALIGNED MapiFileDesc, UNALIGNED FAR * lpMapiFileDesc;
                     43: 
                     44: #define        MAPI_OLE                                                0x00000001
                     45: #define        MAPI_OLE_STATIC                                 0x00000002
                     46: 
                     47: 
                     48: 
                     49: 
                     50: typedef struct
                     51:   {
                     52:     ULONG ulReserved;           // Reserved for future use
                     53:     ULONG ulRecipClass;         // Recipient class
                     54:                                 // MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG
                     55:     LPSTR lpszName;             // Recipient name
                     56:     LPSTR lpszAddress;          // Recipient address (optional)
                     57:     ULONG ulEIDSize;           // Count in bytes of size of pEntryID
                     58:     LPVOID lpEntryID;           // System-specific recipient reference
                     59:   } UNALIGNED MapiRecipDesc, UNALIGNED FAR * lpMapiRecipDesc;
                     60: 
                     61: #define MAPI_ORIG   0           // Recipient is message originator
                     62: #define MAPI_TO     1           // Recipient is a primary recipient
                     63: #define MAPI_CC     2           // Recipient is a copy recipient
                     64: #define MAPI_BCC    3           // Recipient is blind copy recipient
                     65: 
                     66: 
                     67: 
                     68: typedef struct
                     69:   {
                     70:     ULONG ulReserved;                   // Reserved for future use (M.B. 0)
                     71:     LPSTR lpszSubject;                  // Message Subject
                     72:     LPSTR lpszNoteText;                 // Message Text
                     73:     LPSTR lpszMessageType;              // Message Class
                     74:     LPSTR lpszDateReceived;             // in YYYY/MM/DD HH:MM format   
                     75:        LPSTR lpszConversationID;                       // conversation thread ID
                     76:     FLAGS flFlags;                      // unread,return receipt
                     77:     lpMapiRecipDesc lpOriginator;       // Originator descriptor
                     78:     ULONG nRecipCount;                  // Number of recipients
                     79:     lpMapiRecipDesc lpRecips;           // Recipient descriptors
                     80:     ULONG nFileCount;                   // # of file attachments
                     81:     lpMapiFileDesc lpFiles;             // Attachment descriptors
                     82:   } UNALIGNED MapiMessage, UNALIGNED FAR * lpMapiMessage;
                     83: 
                     84: #define MAPI_UNREAD             0x00000001
                     85: #define MAPI_RECEIPT_REQUESTED  0x00000002
                     86: #define MAPI_SENT               0x00000004
                     87: 
                     88: 
                     89: 
                     90: /*
                     91:  *  Entry points.
                     92:  */
                     93: 
                     94: 
                     95: 
                     96: #define MAPI_LOGON_UI                   0x00000001  // Display logon UI
                     97: #define MAPI_NEW_SESSION                0x00000002  // Do not use default.
                     98: #define MAPI_DIALOG                     0x00000008  // Display a send note UI
                     99: #define MAPI_UNREAD_ONLY                0x00000020  // Only unread messages
                    100: #define MAPI_ENVELOPE_ONLY              0x00000040  // Only header information
                    101: #define MAPI_PEEK                       0x00000080  // Do not mark as read.
                    102: #define MAPI_GUARANTEE_FIFO                            0x00000100      // use date order
                    103: #define        MAPI_BODY_AS_FILE                               0x00000200
                    104: #define MAPI_AB_NOMODIFY                               0x00000400      // Don't allow mods of AB entries
                    105: #define        MAPI_SUPPRESS_ATTACH                    0x00000800      // header + body, no files
                    106: #define        MAPI_FORCE_DOWNLOAD                             0x00001000      // force download of new mail during MAPILogon
                    107: 
                    108: ULONG FAR PASCAL MAPILogon(ULONG ulUIParam, LPSTR lpszName, LPSTR lpszPassword,
                    109:                            FLAGS flFlags, ULONG ulReserved,
                    110:                            LPLHANDLE lplhSession);
                    111: 
                    112: ULONG FAR PASCAL MAPILogoff(LHANDLE lhSession, ULONG ulUIParam, FLAGS flFlags,
                    113:                             ULONG ulReserved);
                    114: 
                    115: ULONG FAR PASCAL MAPISendMail(LHANDLE lhSession, ULONG ulUIParam,
                    116:                               lpMapiMessage lpMessage, FLAGS flFlags,
                    117:                               ULONG ulReserved);
                    118: 
                    119: ULONG FAR PASCAL MAPISendDocuments(ULONG ulUIParam, LPSTR lpszDelimChar,
                    120:                                    LPSTR lpszFilePaths, LPSTR lpszFileNames,
                    121:                                    ULONG ulReserved);
                    122: 
                    123: ULONG FAR PASCAL MAPIFindNext(LHANDLE lhSession, ULONG ulUIParam,
                    124:                               LPSTR lpszMessageType, LPSTR lpszSeedMessageID,
                    125:                               FLAGS flFlags, ULONG ulReserved,
                    126:                               LPSTR lpszMessageID);
                    127: 
                    128: ULONG FAR PASCAL MAPIReadMail(LHANDLE lhSession, ULONG ulUIParam,
                    129:                               LPSTR lpszMessageID, FLAGS flFlags,
                    130:                               ULONG ulReserved, lpMapiMessage FAR *lppMessageOut);
                    131: 
                    132: ULONG FAR PASCAL MAPISaveMail(LHANDLE lhSession, ULONG ulUIParam,
                    133:                               lpMapiMessage pMessage, FLAGS flFlags,
                    134:                               ULONG ulReserved, LPSTR lpszMessageID);
                    135: 
                    136: ULONG FAR PASCAL MAPIDeleteMail(LHANDLE lhSession, ULONG ulUIParam,
                    137:                                 LPSTR lpszMessageID, FLAGS flFlags,
                    138:                                 ULONG ulReserved);
                    139: 
                    140: ULONG FAR PASCAL MAPIFreeBuffer( LPVOID pv );
                    141:                                                        
                    142: ULONG FAR PASCAL MAPIAddress(LHANDLE lhSession, ULONG ulUIParam,
                    143:                                        LPSTR plszCaption, ULONG nEditFields,
                    144:                                        LPSTR lpszLabels, ULONG nRecips,
                    145:                                        lpMapiRecipDesc lpRecips, FLAGS flFlags, ULONG ulReserved, 
                    146:                                        LPULONG lpnNewRecips, lpMapiRecipDesc FAR *lppNewRecips);
                    147: 
                    148: ULONG FAR PASCAL MAPIDetails(LHANDLE lhSession, ULONG ulUIParam,
                    149:                                        lpMapiRecipDesc lpRecip, FLAGS flFlags, ULONG ulReserved);
                    150: 
                    151: ULONG FAR PASCAL MAPIResolveName(LHANDLE lhSession, ULONG ulUIParam,
                    152:                                                LPSTR lpszName, FLAGS flFlags,
                    153:                                                ULONG ulReserved, lpMapiRecipDesc FAR *lppRecip);
                    154: 
                    155: 
                    156: 
                    157: #define SUCCESS_SUCCESS                     0
                    158: #define MAPI_USER_ABORT                     1
                    159: #define MAPI_E_FAILURE                      2
                    160: #define MAPI_E_LOGIN_FAILURE                3
                    161: #define MAPI_E_DISK_FULL                    4
                    162: #define MAPI_E_INSUFFICIENT_MEMORY          5
                    163: #define MAPI_E_ACCESS_DENIED                           6
                    164: #define MAPI_E_TOO_MANY_SESSIONS            8
                    165: #define MAPI_E_TOO_MANY_FILES               9
                    166: #define MAPI_E_TOO_MANY_RECIPIENTS          10
                    167: #define MAPI_E_ATTACHMENT_NOT_FOUND         11
                    168: #define MAPI_E_ATTACHMENT_OPEN_FAILURE      12
                    169: #define MAPI_E_ATTACHMENT_WRITE_FAILURE     13
                    170: #define MAPI_E_UNKNOWN_RECIPIENT            14
                    171: #define MAPI_E_BAD_RECIPTYPE                15
                    172: #define MAPI_E_NO_MESSAGES                  16
                    173: #define MAPI_E_INVALID_MESSAGE              17
                    174: #define MAPI_E_TEXT_TOO_LARGE               18
                    175: #define        MAPI_E_INVALID_SESSION                          19
                    176: #define        MAPI_E_TYPE_NOT_SUPPORTED                       20
                    177: #define        MAPI_E_AMBIGUOUS_RECIPIENT                      21
                    178: #define MAPI_E_MESSAGE_IN_USE                          22
                    179: #define MAPI_E_NETWORK_FAILURE                         23
                    180: #define        MAPI_E_INVALID_EDITFIELDS                       24
                    181: #define        MAPI_E_INVALID_RECIPS                           25
                    182: #define        MAPI_E_NOT_SUPPORTED                            26
                    183: 
                    184: #ifdef __cplusplus
                    185: }
                    186: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.