From 3481e8039eab814ea2689e19d6de2361a6802804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gouget?= Date: Wed, 13 Dec 2000 21:28:57 +0000 Subject: [PATCH] Added mapi.h with the definitions needed by the MFC. --- include/Makefile.in | 1 + include/mapi.h | 107 ++++++++++++++++++++++++++++++++++++++++++++ include/mapidefs.h | 8 ++++ 3 files changed, 116 insertions(+) create mode 100644 include/mapi.h diff --git a/include/Makefile.in b/include/Makefile.in index 14c69a9d87f..7c9eae63c84 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -34,6 +34,7 @@ INSTALLED_INCLUDES = \ instance.h \ lmcons.h \ lzexpand.h \ + mapi.h \ mapidefs.h \ mcx.h \ mmreg.h \ diff --git a/include/mapi.h b/include/mapi.h new file mode 100644 index 00000000000..356e6609a2c --- /dev/null +++ b/include/mapi.h @@ -0,0 +1,107 @@ +#ifndef MAPI_H +#define MAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Some types */ + +typedef unsigned char* LPBYTE; +#ifndef __LHANDLE +#define __LHANDLE +typedef unsigned long LHANDLE, *LPLHANDLE; +#endif +#define lhSessionNull ((LHANDLE)0) + +typedef unsigned long FLAGS; + +typedef struct +{ + ULONG ulReserved; + ULONG flFlags; + ULONG nPosition; + LPSTR lpszPathName; + LPSTR lpszFileName; + LPVOID lpFileType; +} MapiFileDesc, *lpMapiFileDesc; + +typedef struct +{ + ULONG ulReserved; + ULONG ulRecipClass; + LPSTR lpszName; + LPSTR lpszAddress; + ULONG ulEIDSize; + LPVOID lpEntryID; +} MapiRecipDesc, *lpMapiRecipDesc; + +typedef struct +{ + ULONG ulReserved; + LPSTR lpszSubject; + LPSTR lpszNoteText; + LPSTR lpszMessageType; + LPSTR lpszDateReceived; + LPSTR lpszConversationID; + FLAGS flFlags; + lpMapiRecipDesc lpOriginator; + ULONG nRecipCount; + lpMapiRecipDesc lpRecips; + ULONG nFileCount; + lpMapiFileDesc lpFiles; +} MapiMessage, *lpMapiMessage; + + +/* Error codes */ + +#define SUCCESS_SUCCESS 0 +#define MAPI_USER_ABORT 1 +#define MAPI_E_USER_ABORT MAPI_USER_ABORT +#define MAPI_E_FAILURE 2 +#define MAPI_E_LOGON_FAILURE 3 +#define MAPI_E_LOGIN_FAILURE MAPI_E_LOGON_FAILURE +#define MAPI_E_DISK_FULL 4 +#define MAPI_E_INSUFFICIENT_MEMORY 5 +#define MAPI_E_ACCESS_DENIED 6 +#define MAPI_E_TOO_MANY_SESSIONS 8 +#define MAPI_E_TOO_MANY_FILES 9 +#define MAPI_E_TOO_MANY_RECIPIENTS 10 +#define MAPI_E_ATTACHMENT_NOT_FOUND 11 +#define MAPI_E_ATTACHMENT_OPEN_FAILURE 12 +#define MAPI_E_ATTACHMENT_WRITE_FAILURE 13 +#define MAPI_E_UNKNOWN_RECIPIENT 14 +#define MAPI_E_BAD_RECIPTYPE 15 +#define MAPI_E_NO_MESSAGES 16 +#define MAPI_E_INVALID_MESSAGE 17 +#define MAPI_E_TEXT_TOO_LARGE 18 +#define MAPI_E_INVALID_SESSION 19 +#define MAPI_E_TYPE_NOT_SUPPORTED 20 +#define MAPI_E_AMBIGUOUS_RECIPIENT 21 +#define MAPI_E_AMBIG_RECIP MAPI_E_AMBIGUOUS_RECIPIENT +#define MAPI_E_MESSAGE_IN_USE 22 +#define MAPI_E_NETWORK_FAILURE 23 +#define MAPI_E_INVALID_EDITFIELDS 24 +#define MAPI_E_INVALID_RECIPS 25 +#define MAPI_E_NOT_SUPPORTED 26 + + +/* MAPILogon */ + +#define MAPI_LOGON_UI 0x00000001 +#define MAPI_PASSWORD_UI 0x00020000 +#define MAPI_NEW_SESSION 0x00000002 +#define MAPI_FORCE_DOWNLOAD 0x00001000 +#define MAPI_EXTENDED 0x00000020 + + +/* MAPISendMail */ + +#define MAPI_DIALOG 0x00000008 + + +#ifdef __cplusplus +} +#endif + +#endif /* MAPI_H */ diff --git a/include/mapidefs.h b/include/mapidefs.h index b7c205c1127..2768c6446bd 100644 --- a/include/mapidefs.h +++ b/include/mapidefs.h @@ -3,6 +3,14 @@ #include "windef.h" +/* Some types */ + +typedef unsigned char* LPBYTE; +#ifndef __LHANDLE +#define __LHANDLE +typedef unsigned long LHANDLE, *LPLHANDLE; +#endif + #ifndef _tagCY_DEFINED #define _tagCY_DEFINED typedef union tagCY