mapi.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Copyright (C) 2000 François Gouget
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef MAPI_H
  19. #define MAPI_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /* Some types */
  24. #ifndef __LHANDLE
  25. #define __LHANDLE
  26. typedef unsigned long LHANDLE, *LPLHANDLE;
  27. #endif
  28. #define lhSessionNull ((LHANDLE)0)
  29. typedef unsigned long FLAGS;
  30. typedef struct
  31. {
  32. ULONG ulReserved;
  33. ULONG flFlags;
  34. ULONG nPosition;
  35. LPSTR lpszPathName;
  36. LPSTR lpszFileName;
  37. LPVOID lpFileType;
  38. } MapiFileDesc, *lpMapiFileDesc;
  39. typedef struct
  40. {
  41. ULONG ulReserved;
  42. ULONG ulRecipClass;
  43. LPSTR lpszName;
  44. LPSTR lpszAddress;
  45. ULONG ulEIDSize;
  46. LPVOID lpEntryID;
  47. } MapiRecipDesc, *lpMapiRecipDesc;
  48. typedef struct
  49. {
  50. ULONG ulReserved;
  51. LPSTR lpszSubject;
  52. LPSTR lpszNoteText;
  53. LPSTR lpszMessageType;
  54. LPSTR lpszDateReceived;
  55. LPSTR lpszConversationID;
  56. FLAGS flFlags;
  57. lpMapiRecipDesc lpOriginator;
  58. ULONG nRecipCount;
  59. lpMapiRecipDesc lpRecips;
  60. ULONG nFileCount;
  61. lpMapiFileDesc lpFiles;
  62. } MapiMessage, *lpMapiMessage;
  63. /* Error codes */
  64. #define SUCCESS_SUCCESS 0
  65. #define MAPI_USER_ABORT 1
  66. #define MAPI_E_USER_ABORT MAPI_USER_ABORT
  67. #define MAPI_E_FAILURE 2
  68. #define MAPI_E_LOGON_FAILURE 3
  69. #define MAPI_E_LOGIN_FAILURE MAPI_E_LOGON_FAILURE
  70. #define MAPI_E_DISK_FULL 4
  71. #define MAPI_E_INSUFFICIENT_MEMORY 5
  72. #define MAPI_E_ACCESS_DENIED 6
  73. #define MAPI_E_TOO_MANY_SESSIONS 8
  74. #define MAPI_E_TOO_MANY_FILES 9
  75. #define MAPI_E_TOO_MANY_RECIPIENTS 10
  76. #define MAPI_E_ATTACHMENT_NOT_FOUND 11
  77. #define MAPI_E_ATTACHMENT_OPEN_FAILURE 12
  78. #define MAPI_E_ATTACHMENT_WRITE_FAILURE 13
  79. #define MAPI_E_UNKNOWN_RECIPIENT 14
  80. #define MAPI_E_BAD_RECIPTYPE 15
  81. #define MAPI_E_NO_MESSAGES 16
  82. #define MAPI_E_INVALID_MESSAGE 17
  83. #define MAPI_E_TEXT_TOO_LARGE 18
  84. #define MAPI_E_INVALID_SESSION 19
  85. #define MAPI_E_TYPE_NOT_SUPPORTED 20
  86. #define MAPI_E_AMBIGUOUS_RECIPIENT 21
  87. #define MAPI_E_AMBIG_RECIP MAPI_E_AMBIGUOUS_RECIPIENT
  88. #define MAPI_E_MESSAGE_IN_USE 22
  89. #define MAPI_E_NETWORK_FAILURE 23
  90. #define MAPI_E_INVALID_EDITFIELDS 24
  91. #define MAPI_E_INVALID_RECIPS 25
  92. #define MAPI_E_NOT_SUPPORTED 26
  93. /* MAPILogon */
  94. #define MAPI_LOGON_UI 0x00000001
  95. #define MAPI_PASSWORD_UI 0x00020000
  96. #define MAPI_NEW_SESSION 0x00000002
  97. #define MAPI_FORCE_DOWNLOAD 0x00001000
  98. #define MAPI_EXTENDED 0x00000020
  99. /* MAPISendMail */
  100. #define MAPI_DIALOG 0x00000008
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. #endif /* MAPI_H */