Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

483 lines
22 KiB

  1. /*
  2. * M A P I D B G . H
  3. *
  4. * Debugging support for MAPI service providers.
  5. * Support functions are implemented in MAPIDBG.C.
  6. *
  7. * Copyright 1986-1999 Microsoft Corporation. All Rights Reserved.
  8. */
  9. #ifndef __MAPIDBG_H_
  10. #define __MAPIDBG_H_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #if defined (WIN32) && !defined (_WIN32)
  15. #define _WIN32
  16. #endif
  17. /*
  18. * Debugging Macros -------------------------------------------------------
  19. *
  20. * IFDBG(x) Results in the expression x if DEBUG is defined, or
  21. * to nothing if DEBUG is not defined
  22. *
  23. * IFNDBG(x) Results in the expression x if DEBUG is not defined,
  24. * or to nothing if DEBUG is defined
  25. *
  26. * Unreferenced(a) Causes a to be referenced so that the compiler
  27. * doesn't issue warnings about unused local variables
  28. * which exist but are reserved for future use (eg
  29. * ulFlags in many cases)
  30. */
  31. #if defined(DEBUG)
  32. #define IFDBG(x) x
  33. #define IFNDBG(x)
  34. #else
  35. #define IFDBG(x)
  36. #define IFNDBG(x) x
  37. #endif
  38. #ifdef __cplusplus
  39. #define EXTERN_C_BEGIN extern "C" {
  40. #define EXTERN_C_END }
  41. #else
  42. #define EXTERN_C_BEGIN
  43. #define EXTERN_C_END
  44. #endif
  45. #define dimensionof(a) (sizeof(a)/sizeof(*(a)))
  46. #define Unreferenced(a) ((void)(a))
  47. typedef long SCODE;
  48. typedef unsigned long ULONG;
  49. typedef unsigned long DWORD;
  50. /*
  51. * Assert Macros ---------------------------------------------------------
  52. *
  53. * Assert(a) Displays a message indicating the file and line number
  54. * of this Assert() if a == 0. OK'ing an assert traps
  55. * into the debugger.
  56. *
  57. * AssertSz(a,sz) Works like an Assert(), but displays the string sz
  58. * along with the file and line number.
  59. *
  60. * Side asserts A side assert works like an Assert(), but evaluates
  61. * 'a' even when asserts are not enabled.
  62. *
  63. * NF asserts A NF (Non-Fatal) assert works like an Assert(), but
  64. * continues instead of trapping into the debugger when
  65. * OK'ed.
  66. */
  67. #if defined(DEBUG) || defined(ASSERTS_ENABLED)
  68. #define IFTRAP(x) x
  69. #else
  70. #define IFTRAP(x) 0
  71. #endif
  72. #define Trap() IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Trap"))
  73. #define TrapSz(psz) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz))
  74. #define TrapSz1(psz,a1) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1))
  75. #define TrapSz2(psz,a1,a2) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2))
  76. #define TrapSz3(psz,a1,a2,a3) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3))
  77. #define TrapSz4(psz,a1,a2,a3,a4) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4))
  78. #define TrapSz5(psz,a1,a2,a3,a4,a5) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5))
  79. #define TrapSz6(psz,a1,a2,a3,a4,a5,a6) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6))
  80. #define TrapSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7))
  81. #define TrapSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8))
  82. #define TrapSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9))
  83. #define Assert(t) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t),0))
  84. #define AssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz),0))
  85. #define AssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1),0))
  86. #define AssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2),0))
  87. #define AssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3),0))
  88. #define AssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4),0))
  89. #define AssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0))
  90. #define AssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0))
  91. #define AssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0))
  92. #define AssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0))
  93. #define AssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0))
  94. #define SideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t)),0)
  95. #define SideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz)),0)
  96. #define SideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1)),0)
  97. #define SideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2)),0)
  98. #define SideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3)),0)
  99. #define SideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0)
  100. #define SideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0)
  101. #define SideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0)
  102. #define SideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0)
  103. #define SideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0)
  104. #define SideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0)
  105. #define NFAssert(t) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t),0))
  106. #define NFAssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz),0))
  107. #define NFAssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1),0))
  108. #define NFAssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2),0))
  109. #define NFAssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3),0))
  110. #define NFAssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4),0))
  111. #define NFAssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0))
  112. #define NFAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0))
  113. #define NFAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0))
  114. #define NFAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0))
  115. #define NFAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0))
  116. #define NFSideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t)),0)
  117. #define NFSideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz)),0)
  118. #define NFSideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1)),0)
  119. #define NFSideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2)),0)
  120. #define NFSideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3)),0)
  121. #define NFSideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0)
  122. #define NFSideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0)
  123. #define NFSideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0)
  124. #define NFSideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0)
  125. #define NFSideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0)
  126. #define NFSideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0)
  127. /*
  128. * Trace Macros ------------------------------------------------------------
  129. *
  130. * DebugTrace Use for arbitrary formatted output. It
  131. * takes exactly the same arguments as the
  132. * Windows wsprintf() function.
  133. * DebugTraceResult Shorthand for error tracing with an
  134. * HRESULT. Arguments are the name of the
  135. * function (not quoted) and the HRESULT.
  136. * DebugTraceSc Shorthand for error tracing with an
  137. * SCODE. Arguments are the name of the
  138. * function (not quoted) and the SCODE.
  139. * DebugTraceArg Shorthand for invalid parameter
  140. * tracing. Arguments are the name of the
  141. * function (not quoted) and a quoted
  142. * string describing the bad parameter.
  143. */
  144. #if defined(DEBUG) || defined(TRACES_ENABLED)
  145. #define IFTRACE(x) x
  146. #define DebugTrace DebugTraceFn
  147. #else
  148. #define IFTRACE(x) 0
  149. #define DebugTrace 1?0:DebugTraceFn
  150. #endif
  151. #define DebugTraceResult(f,hr) IFTRACE(((hr) ? DebugTraceFn(#f " returns 0x%08lX %s\n", GetScode(hr), SzDecodeScode(GetScode(hr))) : 0))
  152. #define DebugTraceSc(f,sc) IFTRACE(((sc) ? DebugTraceFn(#f " returns 0x%08lX %s\n", sc, SzDecodeScode(sc)) : 0))
  153. #define DebugTraceArg(f,s) IFTRACE(DebugTraceFn(#f ": bad parameter: " s "\n"))
  154. #define DebugTraceLine() IFTRACE(DebugTraceFn("File %s, Line %i \n",__FILE__,__LINE__))
  155. #define DebugTraceProblems(sz, rgprob) IFTRACE(DebugTraceProblemsFn(sz, rgprob))
  156. #define TraceSz(psz) IFTRACE(DebugTraceFn("~" psz))
  157. #define TraceSz1(psz,a1) IFTRACE(DebugTraceFn("~" psz,a1))
  158. #define TraceSz2(psz,a1,a2) IFTRACE(DebugTraceFn("~" psz,a1,a2))
  159. #define TraceSz3(psz,a1,a2,a3) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3))
  160. #define TraceSz4(psz,a1,a2,a3,a4) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4))
  161. #define TraceSz5(psz,a1,a2,a3,a4,a5) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5))
  162. #define TraceSz6(psz,a1,a2,a3,a4,a5,a6) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6))
  163. #define TraceSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7))
  164. #define TraceSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8))
  165. #define TraceSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8,a9))
  166. /* Debugging Functions ---------------------------------------------------- */
  167. EXTERN_C_BEGIN
  168. #ifdef WIN16
  169. #define EXPORTDBG __export
  170. #else
  171. #define EXPORTDBG
  172. #endif
  173. int EXPORTDBG __cdecl DebugTrapFn(int fFatal, char *pszFile, int iLine, char *pszFormat, ...);
  174. int EXPORTDBG __cdecl DebugTraceFn(char *pszFormat, ...);
  175. void EXPORTDBG __cdecl DebugTraceProblemsFn(char *sz, void *rgprob);
  176. char * EXPORTDBG __cdecl SzDecodeScodeFn(SCODE sc);
  177. char * EXPORTDBG __cdecl SzDecodeUlPropTypeFn(unsigned long ulPropType);
  178. char * EXPORTDBG __cdecl SzDecodeUlPropTagFn(unsigned long ulPropTag);
  179. unsigned long EXPORTDBG __cdecl UlPropTagFromSzFn(char *psz);
  180. SCODE EXPORTDBG __cdecl ScodeFromSzFn(char *psz);
  181. void * EXPORTDBG __cdecl DBGMEM_EncapsulateFn(void * pmalloc, char *pszSubsys, int fCheckOften);
  182. void EXPORTDBG __cdecl DBGMEM_ShutdownFn(void * pmalloc);
  183. void EXPORTDBG __cdecl DBGMEM_CheckMemFn(void * pmalloc, int fReportOrphans);
  184. #if defined(_WIN32) && defined(_X86_)
  185. void EXPORTDBG __cdecl DBGMEM_LeakHook(FARPROC pfn);
  186. void EXPORTDBG __cdecl GetCallStack(DWORD *, int, int);
  187. #endif
  188. void EXPORTDBG __cdecl DBGMEM_NoLeakDetectFn(void * pmalloc, void *pv);
  189. void EXPORTDBG __cdecl DBGMEM_SetFailureAtFn(void * pmalloc, ULONG ulFailureAt);
  190. SCODE EXPORTDBG __cdecl ScCheckScFn(SCODE, SCODE *, char *, char *, int);
  191. void * EXPORTDBG __cdecl VMAlloc(ULONG);
  192. void * EXPORTDBG __cdecl VMAllocEx(ULONG, ULONG);
  193. void * EXPORTDBG __cdecl VMRealloc(void *, ULONG);
  194. void * EXPORTDBG __cdecl VMReallocEx(void *, ULONG, ULONG);
  195. ULONG EXPORTDBG __cdecl VMGetSize(void *);
  196. ULONG EXPORTDBG __cdecl VMGetSizeEx(void *, ULONG);
  197. void EXPORTDBG __cdecl VMFree(void *);
  198. void EXPORTDBG __cdecl VMFreeEx(void *, ULONG);
  199. EXTERN_C_END
  200. /*
  201. * Debugging Macros -------------------------------------------------------
  202. *
  203. * SzDecodeScode Returns the string name of an SCODE
  204. * SzDecodeUlPropTag Returns the string name of a property
  205. * tag
  206. * UlPropTagFromSz Given a property tag's name, returns
  207. * its value
  208. * ScodeFromSz Given an SCODE's name, returns its
  209. * value
  210. *
  211. * DBGMEM_Encapsulate Given an IMalloc interface, adds heap-
  212. * checking functionality and returns a
  213. * wrapped interface
  214. * DBGMEM_Shutdown Undoes DBGMEM_Encapsulate, and prints
  215. * out information on any allocations made
  216. * since the interface was encapsulated
  217. * that have not yet been released.
  218. * DBGMEM_CheckMem Checks all memory allocated on the heap,
  219. * and optionally reports leaked blocks.
  220. * DBGMEM_NoLeakDetect Prevents a block from appearing on the leak
  221. * report. Pass NULL for pv to inhibit leak
  222. * reports at all from this heap.
  223. */
  224. #ifdef DEBUG
  225. #define SzDecodeScode(_sc) SzDecodeScodeFn(_sc)
  226. #define SzDecodeUlPropType(_ulPropType) SzDecodeUlPropTypeFn(_ulPropType)
  227. #define SzDecodeUlPropTag(_ulPropTag) SzDecodeUlPropTagFn(_ulPropTag)
  228. #define UlPropTagFromSz(_sz) UlPropTagFromSzFn(_sz)
  229. #define ScodeFromSz(_sz) ScodeFromSzFn(_sz)
  230. #define DBGMEM_Encapsulate(pm, psz, f) DBGMEM_EncapsulateFn(pm, psz, f)
  231. #define DBGMEM_Shutdown(pm) DBGMEM_ShutdownFn(pm)
  232. #define DBGMEM_CheckMem(pm, f) DBGMEM_CheckMemFn(pm, f)
  233. #define DBGMEM_NoLeakDetect(pm, pv) DBGMEM_NoLeakDetectFn(pm, pv)
  234. #define DBGMEM_SetFailureAt(pm, ul) DBGMEM_SetFailureAtFn(pm, ul)
  235. #else
  236. #define SzDecodeScode(_sc) (0)
  237. #define SzDecodeUlPropType(_ulPropType) (0)
  238. #define SzDecodeUlPropTag(_ulPropTag) (0)
  239. #define UlPropTagFromSz(_sz) (0)
  240. #define ScodeFromSz(_sz) (0)
  241. #if defined(__cplusplus) && !defined(CINTERFACE)
  242. #define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \
  243. ((pmalloc)->AddRef(), (pmalloc))
  244. #define DBGMEM_Shutdown(pmalloc) \
  245. ((pmalloc)->Release())
  246. #else
  247. #define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \
  248. ((pmalloc)->lpVtbl->AddRef(pmalloc), (pmalloc))
  249. #define DBGMEM_Shutdown(pmalloc) \
  250. ((pmalloc)->lpVtbl->Release(pmalloc))
  251. #endif
  252. #define DBGMEM_CheckMem(pm, f)
  253. #define DBGMEM_NoLeakDetect(pm, pv)
  254. #define DBGMEM_SetFailureAt(pm, ul)
  255. #endif
  256. /*
  257. * SCODE maps -------------------------------------------------------------
  258. *
  259. * ScCheckSc Given an SCODE and method name, verifies
  260. * that the SCODE can legally be returned from
  261. * thet method. Prints out a debug string if
  262. * it cannot.
  263. * HrCheckHr As ScCheckSc, for functions that return
  264. * HRESULT.
  265. */
  266. #if defined(DEBUG) && !defined(DOS)
  267. #define ScCheckSc(sc,fn) ScCheckScFn(sc,fn##_Scodes,#fn,__FILE__, __LINE__)
  268. #define HrCheckHr(hr,fn) HrCheckSc(GetScode(hr),fn)
  269. #else
  270. #define ScCheckSc(sc,fn) (sc)
  271. #define HrCheckHr(hr,fn) (hr)
  272. #endif
  273. #define HrCheckSc(sc,fn) ResultFromScode(ScCheckSc(sc,fn))
  274. #if defined(DEBUG) && !defined(DOS)
  275. extern SCODE Common_Scodes[];
  276. extern SCODE MAPILogon_Scodes[];
  277. extern SCODE MAPIAllocateBuffer_Scodes[];
  278. extern SCODE MAPIAllocateMore_Scodes[];
  279. extern SCODE MAPIFreeBuffer_Scodes[];
  280. extern SCODE IUnknown_QueryInterface_Scodes[];
  281. extern SCODE IUnknown_AddRef_Scodes[];
  282. extern SCODE IUnknown_Release_Scodes[];
  283. extern SCODE IUnknown_GetLastError_Scodes[];
  284. extern SCODE IMAPIProp_CopyTo_Scodes[];
  285. extern SCODE IMAPIProp_CopyProps_Scodes[];
  286. extern SCODE IMAPIProp_DeleteProps_Scodes[];
  287. extern SCODE IMAPIProp_GetIDsFromNames_Scodes[];
  288. extern SCODE IMAPIProp_GetLastError_Scodes[];
  289. extern SCODE IMAPIProp_GetNamesFromIDs_Scodes[];
  290. extern SCODE IMAPIProp_GetPropList_Scodes[];
  291. extern SCODE IMAPIProp_GetProps_Scodes[];
  292. extern SCODE IMAPIProp_OpenProperty_Scodes[];
  293. extern SCODE IMAPIProp_SetProps_Scodes[];
  294. extern SCODE IMAPIProp_SaveChanges_Scodes[];
  295. extern SCODE IStream_Read_Scodes[];
  296. extern SCODE IStream_Write_Scodes[];
  297. extern SCODE IStream_Seek_Scodes[];
  298. extern SCODE IStream_SetSize_Scodes[];
  299. extern SCODE IStream_Tell_Scodes[];
  300. extern SCODE IStream_LockRegion_Scodes[];
  301. extern SCODE IStream_UnlockRegion_Scodes[];
  302. extern SCODE IStream_Clone_Scodes[];
  303. extern SCODE IStream_CopyTo_Scodes[];
  304. extern SCODE IStream_Revert_Scodes[];
  305. extern SCODE IStream_Stat_Scodes[];
  306. extern SCODE IStream_Commit_Scodes[];
  307. extern SCODE IMAPITable_GetLastError_Scodes[];
  308. extern SCODE IMAPITable_Advise_Scodes[];
  309. extern SCODE IMAPITable_Unadvise_Scodes[];
  310. extern SCODE IMAPITable_GetStatus_Scodes[];
  311. extern SCODE IMAPITable_SetColumns_Scodes[];
  312. extern SCODE IMAPITable_QueryColumns_Scodes[];
  313. extern SCODE IMAPITable_GetRowCount_Scodes[];
  314. extern SCODE IMAPITable_SeekRow_Scodes[];
  315. extern SCODE IMAPITable_SeekRowApprox_Scodes[];
  316. extern SCODE IMAPITable_QueryPosition_Scodes[];
  317. extern SCODE IMAPITable_FindRow_Scodes[];
  318. extern SCODE IMAPITable_Restrict_Scodes[];
  319. extern SCODE IMAPITable_CreateBookmark_Scodes[];
  320. extern SCODE IMAPITable_FreeBookmark_Scodes[];
  321. extern SCODE IMAPITable_SortTable_Scodes[];
  322. extern SCODE IMAPITable_QuerySortOrder_Scodes[];
  323. extern SCODE IMAPITable_QueryRows_Scodes[];
  324. extern SCODE IMAPITable_Abort_Scodes[];
  325. extern SCODE IMAPITable_ExpandRow_Scodes[];
  326. extern SCODE IMAPITable_CollapseRow_Scodes[];
  327. extern SCODE IMAPITable_WaitForCompletion_Scodes[];
  328. extern SCODE IMAPITable_GetCollapseState_Scodes[];
  329. extern SCODE IMAPITable_SetCollapseState_Scodes[];
  330. extern SCODE IMAPISession_LogOff_Scodes[];
  331. extern SCODE IMAPISession_Release_Scodes[];
  332. extern SCODE IMAPISession_GetLastError_Scodes[];
  333. extern SCODE IMAPISession_GetMsgStoresTable_Scodes[];
  334. extern SCODE IMAPISession_GetStatusTable_Scodes[];
  335. extern SCODE IMAPISession_OpenMsgStore_Scodes[];
  336. extern SCODE IMAPISession_OpenAddressBook_Scodes[];
  337. extern SCODE IMAPISession_OpenEntry_Scodes[];
  338. extern SCODE IMAPISession_OpenProfileSection_Scodes[];
  339. extern SCODE IMAPISession_Advise_Scodes[];
  340. extern SCODE IMAPISession_Unadvise_Scodes[];
  341. extern SCODE IMAPISession_CompareEntryIDs_Scodes[];
  342. extern SCODE IMAPISession_MessageOptions_Scodes[];
  343. extern SCODE IMAPISession_QueryDefaultMessageOpt_Scodes[];
  344. extern SCODE IMAPISession_EnumAdrTypes_Scodes[];
  345. extern SCODE IMAPISession_QueryIdentity_Scodes[];
  346. extern SCODE IMAPISession_OpenProfileSection_Scodes[];
  347. extern SCODE IMAPISession_GetStatusTable_Scodes[];
  348. extern SCODE IMsgStore_Advise_Scodes[] ;
  349. extern SCODE IMsgStore_Unadvise_Scodes[] ;
  350. extern SCODE IMsgStore_CompareEntryIDs_Scodes[] ;
  351. extern SCODE IMsgStore_OpenEntry_Scodes[] ;
  352. extern SCODE IMsgStore_SetReceiveFolder_Scodes[];
  353. extern SCODE IMsgStore_GetReceiveFolder_Scodes[];
  354. extern SCODE IMsgStore_GetReceiveFolderTable_Scodes[];
  355. extern SCODE IMsgStore_StoreLogoff_Scodes[];
  356. extern SCODE IMsgStore_AbortSubmit_Scodes[];
  357. extern SCODE IMsgStore_GetOutgoingQueue_Scodes[] ;
  358. extern SCODE IMsgStore_SetLockState_Scodes[] ;
  359. extern SCODE IMsgStore_FinishedMsg_Scodes[] ;
  360. extern SCODE IMsgStore_NotifyNewMail_Scodes[];
  361. extern SCODE IMAPIFolder_GetContentsTable_Scodes[];
  362. extern SCODE IMAPIFolder_GetHierarchyTable_Scodes[];
  363. extern SCODE IMAPIFolder_SaveContentsSort_Scodes[];
  364. extern SCODE IMAPIFolder_OpenEntry_Scodes[];
  365. extern SCODE IMAPIFolder_CreateMessage_Scodes[];
  366. extern SCODE IMAPIFolder_CopyMessages_Scodes[];
  367. extern SCODE IMAPIFolder_DeleteMessages_Scodes[];
  368. extern SCODE IMAPIFolder_CreateFolder_Scodes[];
  369. extern SCODE IMAPIFolder_CopyFolder_Scodes[];
  370. extern SCODE IMAPIFolder_DeleteFolder_Scodes[];
  371. extern SCODE IMAPIFolder_SetSearchCriteria_Scodes[];
  372. extern SCODE IMAPIFolder_GetSearchCriteria_Scodes[];
  373. extern SCODE IMAPIFolder_SetReadFlags_Scodes[];
  374. extern SCODE IMAPIFolder_GetMessageStatus_Scodes[];
  375. extern SCODE IMAPIFolder_SetMessageStatus_Scodes[];
  376. extern SCODE IMAPIFolder_EmptyFolder_Scodes[];
  377. extern SCODE IMessage_SaveChanges_Scodes[];
  378. extern SCODE IMessage_GetAttachmentTable_Scodes[];
  379. extern SCODE IMessage_OpenAttach_Scodes[];
  380. extern SCODE IMessage_CreateAttach_Scodes[];
  381. extern SCODE IMessage_DeleteAttach_Scodes[];
  382. extern SCODE IMessage_GetRecipientTable_Scodes[];
  383. extern SCODE IMessage_ModifyRecipients_Scodes[];
  384. extern SCODE IMessage_SubmitMessage_Scodes[];
  385. extern SCODE IMessage_SetReadFlag_Scodes[];
  386. extern SCODE IAttach_SaveChanges_Scodes[];
  387. extern SCODE IAddrBook_OpenEntry_Scodes[];
  388. extern SCODE IAddrBook_CompareEntryIDs_Scodes[];
  389. extern SCODE IAddrBook_CreateOneOff_Scodes[];
  390. extern SCODE IAddrBook_ResolveName_Scodes[];
  391. extern SCODE IAddrBook_Address_Scodes[];
  392. extern SCODE IAddrBook_Details_Scodes[];
  393. extern SCODE IAddrBook_RecipOptions_Scodes[];
  394. extern SCODE IAddrBook_QueryDefaultRecipOpt_Scodes[];
  395. extern SCODE IAddrBook_Address_Scodes[];
  396. extern SCODE IAddrBook_ButtonPress_Scodes[];
  397. extern SCODE IABContainer_GetContentsTable_Scodes[];
  398. extern SCODE IABContainer_GetHierarchyTable_Scodes[];
  399. extern SCODE INotifObj_ChangeEvMask_Scodes[];
  400. extern SCODE IMAPIStatus_ChangePassword_Scodes[];
  401. extern SCODE IMAPIStatus_FlushQueues_Scodes[];
  402. extern SCODE IMAPIStatus_SettingsDialog_Scodes[];
  403. extern SCODE IMAPIStatus_ValidateState_Scodes[];
  404. extern SCODE IMSProvider_Logon_Scodes[];
  405. extern SCODE IMSProvider_Deinit_Scodes[];
  406. extern SCODE IMSProvider_Init_Scodes[];
  407. extern SCODE IMSProvider_SpoolerLogon_Scodes[];
  408. extern SCODE IMSProvider_Shutdown_Scodes[];
  409. extern SCODE SMAPI_MAPILogon_Scodes[];
  410. extern SCODE SMAPI_MAPILogoff_Scodes[];
  411. extern SCODE SMAPI_MAPIFreeBuffer_Scodes[];
  412. extern SCODE SMAPI_MAPISendMail_Scodes[];
  413. extern SCODE SMAPI_MAPISendDocuments_Scodes[];
  414. extern SCODE SMAPI_MAPIFindNext_Scodes[];
  415. extern SCODE SMAPI_MAPIReadMail_Scodes[];
  416. extern SCODE SMAPI_MAPISaveMail_Scodes[];
  417. extern SCODE SMAPI_MAPIDeleteMail_Scodes[];
  418. extern SCODE SMAPI_MAPIAddress_Scodes[];
  419. extern SCODE SMAPI_MAPIResolveName_Scodes[];
  420. extern SCODE SMAPI_MAPIDetails_Scodes[];
  421. extern SCODE IMSLogon_OpenEntry_Scodes[];
  422. extern SCODE IMSLogon_OpenStatusEntry_Scodes[];
  423. extern SCODE IMSLogon_CompareEntryIDs_Scodes[];
  424. extern SCODE IMSLogon_Advise_Scodes[];
  425. extern SCODE IMSLogon_Unadvise_Scodes[];
  426. extern SCODE IMSLogon_Logoff_Scodes[];
  427. #endif
  428. /* ------------------------------------------------------------------------ */
  429. #endif