Leaked source code of windows server 2003
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.

124 lines
2.9 KiB

  1. //
  2. // Function prototypes
  3. //
  4. #undef INTERFACE
  5. #define INTERFACE struct _IPDAT
  6. #undef METHOD_PREFIX
  7. #define METHOD_PREFIX IPDAT_
  8. #undef LPVTBL_ELEM
  9. #define LPVTBL_ELEM lpvtbl
  10. #undef MAPIMETHOD_
  11. #define MAPIMETHOD_(type, method) MAPIMETHOD_DECLARE(type, method, IPDAT_)
  12. MAPI_IUNKNOWN_METHODS(IMPL)
  13. MAPI_IMAPIPROP_METHODS(IMPL)
  14. MAPI_IPROPDATA_METHODS(IMPL)
  15. #undef MAPIMETHOD_
  16. #define MAPIMETHOD_(type, method) MAPIMETHOD_TYPEDEF(type, method, IPDAT_)
  17. MAPI_IUNKNOWN_METHODS(IMPL)
  18. MAPI_IMAPIPROP_METHODS(IMPL)
  19. MAPI_IPROPDATA_METHODS(IMPL)
  20. #undef MAPIMETHOD_
  21. #define MAPIMETHOD_(type, method) STDMETHOD_(type, method)
  22. DECLARE_MAPI_INTERFACE(IPDAT_)
  23. {
  24. BEGIN_INTERFACE
  25. MAPI_IUNKNOWN_METHODS(IMPL)
  26. MAPI_IMAPIPROP_METHODS(IMPL)
  27. MAPI_IPROPDATA_METHODS(IMPL)
  28. };
  29. /* Generic part of property linked lists.
  30. */
  31. typedef struct _lstlnk {
  32. struct _lstlnk FAR * lpNext;
  33. ULONG ulKey;
  34. } LSTLNK, FAR * LPLSTLNK;
  35. typedef LPLSTLNK FAR * LPPLSTLNK;
  36. /* Linked list of property values.
  37. */
  38. typedef struct _lstspv {
  39. LSTLNK lstlnk;
  40. LPSPropValue lpPropVal;
  41. ULONG ulAccess;
  42. } LSTSPV, FAR * LPLSTSPV;
  43. #define CBLSTSPV sizeof(LSTSPV)
  44. /* Linked list of property ID to NAME mappings.
  45. */
  46. typedef struct _lstspn {
  47. LSTLNK lstlnk;
  48. LPMAPINAMEID lpPropName;
  49. } LSTSPN, FAR * LPLSTSPN;
  50. typedef struct _IPDAT {
  51. IPDAT_Vtbl FAR * lpVtbl;
  52. // Generic IMAPIUnknown portion
  53. UNKOBJ_MEMBERS;
  54. UNKINST inst;
  55. //
  56. // Says whether or not this object (as a whole) is modifiable
  57. //
  58. ULONG ulObjAccess;
  59. // List of properties in this object
  60. LPLSTSPV lpLstSPV;
  61. // Count of properties in this object
  62. ULONG ulCount;
  63. // List of property ID to NAME maps for this object
  64. LPLSTSPN lpLstSPN;
  65. // Next ID to use when creating a new NAME to ID map
  66. ULONG ulNextMapID;
  67. } IPDAT, *LPIPDAT;
  68. #define CBIPDAT sizeof(IPDAT)
  69. /* dimensionof determines the number of elements in "array".
  70. */
  71. #ifdef WIN16
  72. #ifndef dimensionof
  73. #define dimensionof(rg) (sizeof(rg)/sizeof(*(rg)))
  74. #endif // !dimensionof
  75. #else // WIN16
  76. #define dimensionof(rg) (sizeof(rg)/sizeof(*(rg)))
  77. #endif // WIN16
  78. #define SET_PROP_TYPE(ultag, ultype) (ultag) = ((ultag) & 0xffff0000) \
  79. | (ultype)
  80. #define MIN_NAMED_PROP_ID 0x8000
  81. #define MAX_NAMED_PROP_ID 0xfffe
  82. SCODE ScWCToAnsiMore( LPALLOCATEMORE lpMapiAllocMore, LPVOID lpBase,
  83. LPWSTR lpszWC, LPSTR * lppszAnsi );
  84. SCODE ScAnsiToWCMore( LPALLOCATEMORE lpMapiAllocMore, LPVOID lpBase,
  85. LPSTR lpszAnsi, LPWSTR * lppszWC );
  86. LPSTR ConvertWtoA(LPCWSTR lpszW);
  87. LPWSTR ConvertAtoW(LPCSTR lpszA);
  88. SCODE ScConvertAPropsToW(LPALLOCATEMORE lpMapiAllocMore, LPSPropValue lpPropArray, ULONG ulcProps, ULONG ulStart);
  89. SCODE ScConvertWPropsToA(LPALLOCATEMORE lpMapiAllocMore, LPSPropValue lpPropArray, ULONG ulcProps, ULONG ulStart);