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.

115 lines
3.5 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994-1999 **
  4. //*********************************************************************
  5. //
  6. // MAPICALL.H - Header file for MAPI callout module
  7. //
  8. //
  9. // HISTORY:
  10. //
  11. // 1/27/95 jeremys Created.
  12. // 96/03/26 markdu Put #ifdef __cplusplus around extern "C"
  13. //
  14. #ifndef _MAPICALL_H_
  15. #define _MAPICALL_H_
  16. #undef MAPI_DIM
  17. #define MAPI_DIM 10
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif // __cplusplus
  22. #include <mapidefs.h>
  23. #include <mapicode.h>
  24. #include <mspst.h>
  25. #include <mspab.h>
  26. #define MAPI_NOWIDECHAR // MAPI guys...don't map lstr*W to MNLS_lstr*W
  27. #include <mapiwin.h>
  28. #include <mapitags.h>
  29. #include <mapiutil.h>
  30. #include <mapispi.h>
  31. #include "inetprop.h"
  32. #ifdef DEBUG
  33. #undef Assert // more MAPI guys!
  34. #include <mapidbg.h>
  35. #endif
  36. #ifdef __cplusplus
  37. }
  38. #endif // __cplusplus
  39. // prototype for function pointer for MAPI util function
  40. typedef HRESULT (CALLBACK * LPHRQUERYALLROWS) (LPMAPITABLE, LPSPropTagArray,
  41. LPSRestriction, LPSSortOrderSet,LONG,LPSRowSet FAR *);
  42. extern HINSTANCE hInstMAPIDll; // handle to MAPI dll we load explicitly
  43. // structure used in determining if a service is present in a MAPI profile,
  44. // and to install the service
  45. typedef struct tagMSGSERVICE {
  46. BOOL fPresent; // TRUE if service is present
  47. UINT uIDServiceName; // ID of str resource with service name (non-UI)
  48. UINT uIDServiceDescription; // ID of str resource with service desc (for UI)
  49. BOOL fNeedConfig; // TRUE if create-time config proc should be called
  50. UINT uIDStoreFilename; // name to try for message store for
  51. UINT uIDStoreFilename1; // name to use to generate other message store names
  52. UINT uPropID; // prop val ID for message store property for this service
  53. } MSGSERVICE;
  54. #define NUM_SERVICES 3 // number of services in table of MSGSERVICEs
  55. // class to aid in releasing interfaces. When you obtain an OLE interface,
  56. // you can contruct a RELEASE_ME_LATER object with the pointer to the interface.
  57. // When the object is destructed, it will release the interface.
  58. class RELEASE_ME_LATER
  59. {
  60. private:
  61. LPUNKNOWN _lpInterface;
  62. public:
  63. RELEASE_ME_LATER(LPUNKNOWN lpInterface) { _lpInterface = lpInterface; }
  64. ~RELEASE_ME_LATER() { if (_lpInterface) _lpInterface->Release(); }
  65. };
  66. // defines needed by route 66 config DLL. Note: don't change these!
  67. #define CONNECT_TYPE_LAN 1
  68. #define CONNECT_TYPE_REMOTE 2
  69. #define DOWNLOAD_OPTION_HEADERS 1
  70. #define DOWNLOAD_OPTION_MAIL_DELETE 3
  71. class ENUM_MAPI_PROFILE
  72. {
  73. private:
  74. LPSRowSet _pProfileRowSet;
  75. UINT _iRow;
  76. UINT _nEntries;
  77. public:
  78. ENUM_MAPI_PROFILE();
  79. ~ENUM_MAPI_PROFILE();
  80. BOOL Next(LPWSTR * ppProfileName, BOOL * pfDefault);
  81. UINT GetEntryCount() { return _nEntries; }
  82. };
  83. class ENUM_MAPI_SERVICE
  84. {
  85. private:
  86. LPSRowSet _pServiceRowSet;
  87. UINT _iRow;
  88. UINT _nEntries;
  89. public:
  90. ENUM_MAPI_SERVICE(LPWSTR pszProfileName);
  91. ~ENUM_MAPI_SERVICE();
  92. BOOL Next(LPWSTR * ppServiceName);
  93. UINT GetEntryCount() { return _nEntries; }
  94. };
  95. #endif // _MAPICALL_H_