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.

113 lines
3.2 KiB

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