MAPIErrors.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. /**
  18. * MAPIErrors.h
  19. * Declarations of GetMAPIErrorMessage() and supporting data structures and
  20. * constants
  21. */
  22. #ifndef MAPIERRORS_H_INCLUDED
  23. #define MAPIERRORS_H_INCLUDED
  24. #include <kopano/zcdefs.h>
  25. #include <kopano/platform.h> // for declaration of HRESULT
  26. #include <string>
  27. #ifndef __M4L_MAPICODE_H_
  28. #ifndef MAPICODE_H
  29. const HRESULT MAPI_E_CALL_FAILED = 0x80004005;
  30. const HRESULT MAPI_E_NOT_ENOUGH_MEMORY = 0x8007000E;
  31. const HRESULT MAPI_E_INVALID_PARAMETER = 0x80070057;
  32. const HRESULT MAPI_E_INTERFACE_NOT_SUPPORTED = 0x80004002;
  33. const HRESULT MAPI_E_NO_ACCESS = 0x80070005;
  34. const HRESULT MAPI_E_NO_SUPPORT = 0x80040102;
  35. const HRESULT MAPI_E_BAD_CHARWIDTH = 0x80040103;
  36. const HRESULT MAPI_E_STRING_TOO_LONG = 0x80040105;
  37. const HRESULT MAPI_E_UNKNOWN_FLAGS = 0x80040106;
  38. const HRESULT MAPI_E_INVALID_ENTRYID = 0x80040107;
  39. const HRESULT MAPI_E_INVALID_OBJECT = 0x80040108;
  40. const HRESULT MAPI_E_OBJECT_CHANGED = 0x80040109;
  41. const HRESULT MAPI_E_OBJECT_DELETED = 0x8004010A;
  42. const HRESULT MAPI_E_BUSY = 0x8004010B;
  43. const HRESULT MAPI_E_NOT_ENOUGH_DISK = 0x8004010D;
  44. const HRESULT MAPI_E_NOT_ENOUGH_RESOURCES = 0x8004010E;
  45. const HRESULT MAPI_E_NOT_FOUND = 0x8004010F;
  46. const HRESULT MAPI_E_VERSION = 0x80040110;
  47. const HRESULT MAPI_E_LOGON_FAILED = 0x80040111;
  48. const HRESULT MAPI_E_SESSION_LIMIT = 0x80040112;
  49. const HRESULT MAPI_E_USER_CANCEL = 0x80040113;
  50. const HRESULT MAPI_E_UNABLE_TO_ABORT = 0x80040114;
  51. const HRESULT MAPI_E_NETWORK_ERROR = 0x80040115;
  52. const HRESULT MAPI_E_DISK_ERROR = 0x80040116;
  53. const HRESULT MAPI_E_TOO_COMPLEX = 0x80040117;
  54. const HRESULT MAPI_E_BAD_COLUMN = 0x80040118;
  55. const HRESULT MAPI_E_EXTENDED_ERROR = 0x80040119;
  56. const HRESULT MAPI_E_COMPUTED = 0x8004011A;
  57. const HRESULT MAPI_E_CORRUPT_DATA = 0x8004011B;
  58. const HRESULT MAPI_E_UNCONFIGURED = 0x8004011C;
  59. const HRESULT MAPI_E_FAILONEPROVIDER = 0x8004011D;
  60. const HRESULT MAPI_E_UNKNOWN_CPID = 0x8004011E;
  61. const HRESULT MAPI_E_UNKNOWN_LCID = 0x8004011F;
  62. const HRESULT MAPI_E_PASSWORD_CHANGE_REQUIRED = 0x80040120;
  63. const HRESULT MAPI_E_PASSWORD_EXPIRED = 0x80040121;
  64. const HRESULT MAPI_E_INVALID_WORKSTATION_ACCOUNT = 0x80040122;
  65. const HRESULT MAPI_E_INVALID_ACCESS_TIME = 0x80040123;
  66. const HRESULT MAPI_E_ACCOUNT_DISABLED = 0x80040124;
  67. const HRESULT MAPI_E_END_OF_SESSION = 0x80040200;
  68. const HRESULT MAPI_E_UNKNOWN_ENTRYID = 0x80040201;
  69. const HRESULT MAPI_E_MISSING_REQUIRED_COLUMN = 0x80040202;
  70. const HRESULT MAPI_W_NO_SERVICE = 0x00040203;
  71. const HRESULT MAPI_E_BAD_VALUE = 0x80040301;
  72. const HRESULT MAPI_E_INVALID_TYPE = 0x80040302;
  73. const HRESULT MAPI_E_TYPE_NO_SUPPORT = 0x80040303;
  74. const HRESULT MAPI_E_UNEXPECTED_TYPE = 0x80040304;
  75. const HRESULT MAPI_E_TOO_BIG = 0x80040305;
  76. const HRESULT MAPI_E_DECLINE_COPY = 0x80040306;
  77. const HRESULT MAPI_E_UNEXPECTED_ID = 0x80040307;
  78. const HRESULT MAPI_W_ERRORS_RETURNED = 0x00040380;
  79. const HRESULT MAPI_E_UNABLE_TO_COMPLETE = 0x80040400;
  80. const HRESULT MAPI_E_TIMEOUT = 0x80040401;
  81. const HRESULT MAPI_E_TABLE_EMPTY = 0x80040402;
  82. const HRESULT MAPI_E_TABLE_TOO_BIG = 0x80040403;
  83. const HRESULT MAPI_E_INVALID_BOOKMARK = 0x80040405;
  84. const HRESULT MAPI_W_POSITION_CHANGED = 0x00040481;
  85. const HRESULT MAPI_W_APPROX_COUNT = 0x00040482;
  86. const HRESULT MAPI_E_WAIT = 0x80040500;
  87. const HRESULT MAPI_E_CANCEL = 0x80040501;
  88. const HRESULT MAPI_E_NOT_ME = 0x80040502;
  89. const HRESULT MAPI_W_CANCEL_MESSAGE = 0x00040580;
  90. const HRESULT MAPI_E_CORRUPT_STORE = 0x80040600;
  91. const HRESULT MAPI_E_NOT_IN_QUEUE = 0x80040601;
  92. const HRESULT MAPI_E_NO_SUPPRESS = 0x80040602;
  93. const HRESULT MAPI_E_COLLISION = 0x80040604;
  94. const HRESULT MAPI_E_NOT_INITIALIZED = 0x80040605;
  95. const HRESULT MAPI_E_NON_STANDARD = 0x80040606;
  96. const HRESULT MAPI_E_NO_RECIPIENTS = 0x80040607;
  97. const HRESULT MAPI_E_SUBMITTED = 0x80040608;
  98. const HRESULT MAPI_E_HAS_FOLDERS = 0x80040609;
  99. const HRESULT MAPI_E_HAS_MESSAGES = 0x8004060A;
  100. const HRESULT MAPI_E_FOLDER_CYCLE = 0x8004060B;
  101. const HRESULT MAPI_W_PARTIAL_COMPLETION = 0x00040680;
  102. const HRESULT MAPI_E_AMBIGUOUS_RECI = 0x80040700;
  103. #ifndef ECMAPIEXT_H // mapiext.h
  104. const HRESULT MAPI_E_STORE_FULL = 0x8004060c;
  105. #endif // !defined ECMAPIEXT_H
  106. #endif // !defined MAPICODE_H
  107. #endif // !defined __M4L_MAPICODE_H_
  108. namespace KC {
  109. extern _kc_export const char *GetMAPIErrorMessage(HRESULT);
  110. extern _kc_export std::string getMapiCodeString(HRESULT, const char *object = "object");
  111. } /* namespace */
  112. #endif // !defined MAPIERRORS_H_INCLUDED