home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MSINC.PAK / MAPIX.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  29KB  |  550 lines

  1. /*
  2.  *  M A P I X . H
  3.  *
  4.  *  Definitions of objects/flags, etc used by Extended MAPI.
  5.  *
  6.  *  Copyright 1993-1995 Microsoft Corporation. All Rights Reserved.
  7.  */
  8.  
  9. #ifndef MAPIX_H
  10. #define MAPIX_H
  11.  
  12. /* Include common MAPI header files if they haven't been already. */
  13. #ifndef MAPIDEFS_H
  14. #include <mapidefs.h>
  15. #endif
  16. #ifndef MAPICODE_H
  17. #include <mapicode.h>
  18. #endif
  19. #ifndef MAPIGUID_H
  20. #include <mapiguid.h>
  21. #endif
  22. #ifndef MAPITAGS_H
  23. #include <mapitags.h>
  24. #endif
  25.  
  26. #ifdef __BORLANDC__
  27.   #include <pshpack8.h>
  28. #endif
  29.  
  30. #ifdef  __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #ifndef BEGIN_INTERFACE
  35. #define BEGIN_INTERFACE
  36. #endif
  37.  
  38. /* Forward interface declarations */
  39.  
  40. DECLARE_MAPI_INTERFACE_PTR(IProfAdmin,          LPPROFADMIN);
  41. DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin,    LPSERVICEADMIN);
  42. DECLARE_MAPI_INTERFACE_PTR(IMAPISession,        LPMAPISESSION);
  43.  
  44. /* ------------------------------------------------------ */
  45. /* shared with simple mapi */
  46.  
  47. typedef ULONG       FLAGS;
  48.  
  49. /* MAPILogon() flags.       */
  50.  
  51. #define MAPI_LOGON_UI           0x00000001  /* Display logon UI                 */
  52. #define MAPI_NEW_SESSION        0x00000002  /* Don't use shared session         */
  53. #define MAPI_ALLOW_OTHERS       0x00000008  /* Make this a shared session       */
  54. #define MAPI_EXPLICIT_PROFILE   0x00000010  /* Don't use default profile        */
  55. #define MAPI_EXTENDED           0x00000020  /* Extended MAPI Logon              */
  56. #define MAPI_FORCE_DOWNLOAD     0x00001000  /* Get new mail before return       */
  57. #define MAPI_SERVICE_UI_ALWAYS  0x00002000  /* Do logon UI in all providers     */
  58. #define MAPI_NO_MAIL            0x00008000  /* Do not activate transports       */
  59. #define MAPI_NT_SERVICE         0x00010000  /* Allow logon from an NT service   */
  60. #ifndef MAPI_PASSWORD_UI
  61. #define MAPI_PASSWORD_UI        0x00020000  /* Display password UI only         */
  62. #endif
  63. #define MAPI_TIMEOUT_SHORT      0x00100000  /* Minimal wait for logon resources */
  64.  
  65. #define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI | MAPI_FORCE_DOWNLOAD | MAPI_ALLOW_OTHERS)
  66. #define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION | MAPI_FORCE_DOWNLOAD | MAPI_EXPLICIT_PROFILE)
  67.  
  68. /* Structure passed to MAPIInitialize(), and its ulFlags values */
  69.  
  70. typedef struct
  71. {
  72.     ULONG           ulVersion;
  73.     ULONG           ulFlags;
  74. } MAPIINIT_0, FAR *LPMAPIINIT_0;
  75.  
  76. typedef MAPIINIT_0 MAPIINIT;
  77. typedef MAPIINIT FAR *LPMAPIINIT;
  78.  
  79. #define MAPI_INIT_VERSION               0
  80.  
  81. #define MAPI_MULTITHREAD_NOTIFICATIONS  0x00000001
  82. /* Reserved for MAPI                    0x40000000 */
  83. /* #define MAPI_NT_SERVICE              0x00010000  Use from NT service */
  84.  
  85. /* MAPI base functions */
  86.  
  87. typedef HRESULT (STDAPICALLTYPE MAPIINITIALIZE)(
  88.     LPVOID          lpMapiInit
  89. );
  90. typedef MAPIINITIALIZE FAR *LPMAPIINITIALIZE;
  91.  
  92. typedef void (STDAPICALLTYPE MAPIUNINITIALIZE)(void);
  93. typedef MAPIUNINITIALIZE FAR *LPMAPIUNINITIALIZE;
  94.  
  95. MAPIINITIALIZE      MAPIInitialize;
  96. MAPIUNINITIALIZE    MAPIUninitialize;
  97.  
  98.  
  99. /*  Extended MAPI Logon function */
  100.  
  101.  
  102. typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)(
  103.     ULONG ulUIParam,
  104.     LPTSTR lpszProfileName,
  105.     LPTSTR lpszPassword,
  106.     ULONG ulFlags,   /*  ulFlags takes all that SimpleMAPI does + MAPI_UNICODE */
  107.     LPMAPISESSION FAR * lppSession
  108. );
  109. typedef MAPILOGONEX FAR *LPMAPILOGONEX;
  110.  
  111. MAPILOGONEX MAPILogonEx;
  112.  
  113.  
  114. typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEBUFFER)(
  115.     ULONG           cbSize,
  116.     LPVOID FAR *    lppBuffer
  117. );
  118.  
  119. typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEMORE)(
  120.     ULONG           cbSize,
  121.     LPVOID          lpObject,
  122.     LPVOID FAR *    lppBuffer
  123. );
  124.  
  125. typedef ULONG (STDAPICALLTYPE MAPIFREEBUFFER)(
  126.     LPVOID          lpBuffer
  127. );
  128.  
  129. typedef MAPIALLOCATEBUFFER FAR  *LPMAPIALLOCATEBUFFER;
  130. typedef MAPIALLOCATEMORE FAR    *LPMAPIALLOCATEMORE;
  131. typedef MAPIFREEBUFFER FAR      *LPMAPIFREEBUFFER;
  132.  
  133. MAPIALLOCATEBUFFER MAPIAllocateBuffer;
  134. MAPIALLOCATEMORE MAPIAllocateMore;
  135. MAPIFREEBUFFER MAPIFreeBuffer;
  136.  
  137. typedef HRESULT (STDMETHODCALLTYPE MAPIADMINPROFILES)(
  138.     ULONG ulFlags,
  139.     LPPROFADMIN FAR *lppProfAdmin
  140. );
  141.  
  142. typedef MAPIADMINPROFILES FAR *LPMAPIADMINPROFILES;
  143.  
  144. MAPIADMINPROFILES MAPIAdminProfiles;
  145.  
  146. /* IMAPISession Interface -------------------------------------------------- */
  147.  
  148. /* Flags for OpenEntry and others */
  149.  
  150. /*#define MAPI_MODIFY               ((ULONG) 0x00000001) */
  151.  
  152. /* Flags for Logoff */
  153.  
  154. #define MAPI_LOGOFF_SHARED      0x00000001  /* Close all shared sessions    */
  155. #define MAPI_LOGOFF_UI          0x00000002  /* It's OK to present UI        */
  156.  
  157. /* Flags for SetDefaultStore. They are mutually exclusive. */
  158.  
  159. #define MAPI_DEFAULT_STORE          0x00000001  /* for incoming messages */
  160. #define MAPI_SIMPLE_STORE_TEMPORARY 0x00000002  /* for simple MAPI and CMC */
  161. #define MAPI_SIMPLE_STORE_PERMANENT 0x00000003  /* for simple MAPI and CMC */
  162. #define MAPI_PRIMARY_STORE          0x00000004  /* Used by some clients */
  163. #define MAPI_SECONDARY_STORE        0x00000005  /* Used by some clients */
  164.  
  165. /* Flags for ShowForm. */
  166.  
  167. #define MAPI_POST_MESSAGE       0x00000001  /* Selects post/send semantics */
  168. #define MAPI_NEW_MESSAGE        0x00000002  /* Governs copying during submission */
  169.  
  170. /*  MessageOptions */
  171. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  172.  
  173. /*  QueryDefaultMessageOpt */
  174. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  175.  
  176. #define MAPI_IMAPISESSION_METHODS(IPURE)                                \
  177.     MAPIMETHOD(GetLastError)                                            \
  178.         (THIS_  HRESULT                     hResult,                    \
  179.                 ULONG                       ulFlags,                    \
  180.                 LPMAPIERROR FAR *           lppMAPIError) IPURE;        \
  181.     MAPIMETHOD(GetMsgStoresTable)                                       \
  182.         (THIS_  ULONG                       ulFlags,                    \
  183.                 LPMAPITABLE FAR *           lppTable) IPURE;            \
  184.     MAPIMETHOD(OpenMsgStore)                                            \
  185.         (THIS_  ULONG                       ulUIParam,                  \
  186.                 ULONG                       cbEntryID,                  \
  187.                 LPENTRYID                   lpEntryID,                  \
  188.                 LPCIID                      lpInterface,                \
  189.                 ULONG                       ulFlags,                    \
  190.                 LPMDB FAR *                 lppMDB) IPURE;              \
  191.     MAPIMETHOD(OpenAddressBook)                                         \
  192.         (THIS_  ULONG                       ulUIParam,                  \
  193.                 LPCIID                      lpInterface,                \
  194.                 ULONG                       ulFlags,                    \
  195.                 LPADRBOOK FAR *             lppAdrBook) IPURE;          \
  196.     MAPIMETHOD(OpenProfileSection)                                      \
  197.         (THIS_  LPMAPIUID                   lpUID,                      \
  198.                 LPCIID                      lpInterface,                \
  199.                 ULONG                       ulFlags,                    \
  200.                 LPPROFSECT FAR *            lppProfSect) IPURE;         \
  201.     MAPIMETHOD(GetStatusTable)                                          \
  202.         (THIS_  ULONG                       ulFlags,                    \
  203.                 LPMAPITABLE FAR *           lppTable) IPURE;            \
  204.     MAPIMETHOD(OpenEntry)                                               \
  205.         (THIS_  ULONG                       cbEntryID,                  \
  206.                 LPENTRYID                   lpEntryID,                  \
  207.                 LPCIID                      lpInterface,                \
  208.                 ULONG                       ulFlags,                    \
  209.                 ULONG FAR *                 lpulObjType,                \
  210.                 LPUNKNOWN FAR *             lppUnk) IPURE;  \
  211.     MAPIMETHOD(CompareEntryIDs)                                         \
  212.         (THIS_  ULONG                       cbEntryID1,                 \
  213.                 LPENTRYID                   lpEntryID1,                 \
  214.                 ULONG                       cbEntryID2,                 \
  215.                 LPENTRYID                   lpEntryID2,                 \
  216.                 ULONG                       ulFlags,                    \
  217.                 ULONG FAR *                 lpulResult) IPURE;          \
  218.     MAPIMETHOD(Advise)                                                  \
  219.         (THIS_  ULONG                       cbEntryID,                  \
  220.                 LPENTRYID                   lpEntryID,                  \
  221.                 ULONG                       ulEventMask,                \
  222.                 LPMAPIADVISESINK            lpAdviseSink,               \
  223.                 ULONG FAR *                 lpulConnection) IPURE;      \
  224.     MAPIMETHOD(Unadvise)                                                \
  225.         (THIS_  ULONG                       ulConnection) IPURE;        \
  226.     MAPIMETHOD(MessageOptions)                                          \
  227.         (THIS_  ULONG                       ulUIParam,                  \
  228.                 ULONG                       ulFlags,                    \
  229.                 LPTSTR                      lpszAdrType,                \
  230.                 LPMESSAGE                   lpMessage) IPURE;           \
  231.     MAPIMETHOD(QueryDefaultMessageOpt)                                  \
  232.         (THIS_  LPTSTR                      lpszAdrType,                \
  233.                 ULONG                       ulFlags,                    \
  234.                 ULONG FAR *                 lpcValues,                  \
  235.                 LPSPropValue FAR *          lppOptions) IPURE;          \
  236.     MAPIMETHOD(EnumAdrTypes)                                            \
  237.         (THIS_  ULONG                       ulFlags,                    \
  238.                 ULONG FAR *                 lpcAdrTypes,                \
  239.                 LPTSTR FAR * FAR *          lpppszAdrTypes) IPURE;      \
  240.     MAPIMETHOD(QueryIdentity)                                           \
  241.         (THIS_  ULONG FAR *                 lpcbEntryID,                \
  242.                 LPENTRYID FAR *             lppEntryID) IPURE;          \
  243.     MAPIMETHOD(Logoff)                                                  \
  244.         (THIS_  ULONG                       ulUIParam,                  \
  245.                 ULONG                       ulFlags,                    \
  246.                 ULONG                       ulReserved) IPURE;          \
  247.     MAPIMETHOD(SetDefaultStore)                                         \
  248.         (THIS_  ULONG                       ulFlags,                    \
  249.                 ULONG                       cbEntryID,                  \
  250.                 LPENTRYID                   lpEntryID) IPURE;           \
  251.     MAPIMETHOD(AdminServices)                                           \
  252.         (THIS_  ULONG                       ulFlags,                    \
  253.                 LPSERVICEADMIN FAR *        lppServiceAdmin) IPURE;     \
  254.     MAPIMETHOD(ShowForm)                                                \
  255.         (THIS_  ULONG                       ulUIParam,                  \
  256.                 LPMDB                       lpMsgStore,                 \
  257.                 LPMAPIFOLDER                lpParentFolder,             \
  258.                 LPCIID                      lpInterface,                \
  259.                 ULONG                       ulMessageToken,             \
  260.                 LPMESSAGE                   lpMessageSent,              \
  261.                 ULONG                       ulFlags,                    \
  262.                 ULONG                       ulMessageStatus,            \
  263.                 ULONG                       ulMessageFlags,             \
  264.                 ULONG                       ulAccess,                   \
  265.                 LPSTR                       lpszMessageClass) IPURE;    \
  266.     MAPIMETHOD(PrepareForm)                                             \
  267.         (THIS_  LPCIID                      lpInterface,                \
  268.                 LPMESSAGE                   lpMessage,                  \
  269.                 ULONG FAR *                 lpulMessageToken) IPURE;    \
  270.  
  271.  
  272. #undef       INTERFACE
  273. #define      INTERFACE  IMAPISession
  274. DECLARE_MAPI_INTERFACE_(IMAPISession, IUnknown)
  275. {
  276.     BEGIN_INTERFACE 
  277.     MAPI_IUNKNOWN_METHODS(PURE)
  278.     MAPI_IMAPISESSION_METHODS(PURE)
  279. };
  280.  
  281. /*DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION);*/
  282.  
  283. /* IAddrBook Interface ----------------------------------------------------- */
  284.  
  285. /*  CreateOneOff */
  286. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  287. /****** MAPI_SEND_NO_RICH_INFO      ((ULONG) 0x00010000) */
  288.  
  289. /*  RecipOptions */
  290. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  291.  
  292. /*  QueryDefaultRecipOpt */
  293. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  294.  
  295. /*  GetSearchPath */
  296. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  297.  
  298.  
  299. #define MAPI_IADDRBOOK_METHODS(IPURE)                                   \
  300.     MAPIMETHOD(OpenEntry)                                               \
  301.         (THIS_  ULONG                       cbEntryID,                  \
  302.                 LPENTRYID                   lpEntryID,                  \
  303.                 LPCIID                      lpInterface,                \
  304.                 ULONG                       ulFlags,                    \
  305.                 ULONG FAR *                 lpulObjType,                \
  306.                 LPUNKNOWN FAR *             lppUnk) IPURE;  \
  307.     MAPIMETHOD(CompareEntryIDs)                                         \
  308.         (THIS_  ULONG                       cbEntryID1,                 \
  309.                 LPENTRYID                   lpEntryID1,                 \
  310.                 ULONG                       cbEntryID2,                 \
  311.                 LPENTRYID                   lpEntryID2,                 \
  312.                 ULONG                       ulFlags,                    \
  313.                 ULONG FAR *                 lpulResult) IPURE;          \
  314.     MAPIMETHOD(Advise)                                                  \
  315.         (THIS_  ULONG                       cbEntryID,                  \
  316.                 LPENTRYID                   lpEntryID,                  \
  317.                 ULONG                       ulEventMask,                \
  318.                 LPMAPIADVISESINK            lpAdviseSink,               \
  319.                 ULONG FAR *                 lpulConnection) IPURE;      \
  320.     MAPIMETHOD(Unadvise)                                                \
  321.         (THIS_  ULONG                       ulConnection) IPURE;        \
  322.     MAPIMETHOD(CreateOneOff)                                            \
  323.         (THIS_  LPTSTR                      lpszName,                   \
  324.                 LPTSTR                      lpszAdrType,                \
  325.                 LPTSTR                      lpszAddress,                \
  326.                 ULONG                       ulFlags,                    \
  327.                 ULONG FAR *                 lpcbEntryID,                \
  328.                 LPENTRYID FAR *             lppEntryID) IPURE;          \
  329.     MAPIMETHOD(NewEntry)                                                \
  330.         (THIS_  ULONG                       ulUIParam,                  \
  331.                 ULONG                       ulFlags,                    \
  332.                 ULONG                       cbEIDContainer,             \
  333.                 LPENTRYID                   lpEIDContainer,             \
  334.                 ULONG                       cbEIDNewEntryTpl,           \
  335.                 LPENTRYID                   lpEIDNewEntryTpl,           \
  336.                 ULONG FAR *                 lpcbEIDNewEntry,            \
  337.                 LPENTRYID FAR *             lppEIDNewEntry) IPURE;      \
  338.     MAPIMETHOD(ResolveName)                                             \
  339.         (THIS_  ULONG                       ulUIParam,                  \
  340.                 ULONG                       ulFlags,                    \
  341.                 LPTSTR                      lpszNewEntryTitle,          \
  342.                 LPADRLIST                   lpAdrList) IPURE;           \
  343.     MAPIMETHOD(Address)                                                 \
  344.         (THIS_  ULONG FAR *                 lpulUIParam,                \
  345.                 LPADRPARM                   lpAdrParms,                 \
  346.                 LPADRLIST FAR *             lppAdrList) IPURE;          \
  347.     MAPIMETHOD(Details)                                                 \
  348.         (THIS_  ULONG FAR *                 lpulUIParam,                \
  349.                 LPFNDISMISS                 lpfnDismiss,                \
  350.                 LPVOID                      lpvDismissContext,          \
  351.                 ULONG                       cbEntryID,                  \
  352.                 LPENTRYID                   lpEntryID,                  \
  353.                 LPFNBUTTON                  lpfButtonCallback,          \
  354.                 LPVOID                      lpvButtonContext,           \
  355.                 LPTSTR                      lpszButtonText,             \
  356.                 ULONG                       ulFlags) IPURE;             \
  357.     MAPIMETHOD(RecipOptions)                                            \
  358.         (THIS_  ULONG                       ulUIParam,                  \
  359.                 ULONG                       ulFlags,                    \
  360.                 LPADRENTRY                  lpRecip) IPURE;             \
  361.     MAPIMETHOD(QueryDefaultRecipOpt)                                    \
  362.         (THIS_  LPTSTR                      lpszAdrType,                \
  363.                 ULONG                       ulFlags,                    \
  364.                 ULONG FAR *                 lpcValues,                  \
  365.                 LPSPropValue FAR *          lppOptions) IPURE;          \
  366.     MAPIMETHOD(GetPAB)                                                  \
  367.         (THIS_  ULONG FAR *                 lpcbEntryID,                \
  368.                 LPENTRYID FAR *             lppEntryID) IPURE;          \
  369.     MAPIMETHOD(SetPAB)                                                  \
  370.         (THIS_  ULONG                       cbEntryID,                  \
  371.                 LPENTRYID                   lpEntryID) IPURE;           \
  372.     MAPIMETHOD(GetDefaultDir)                                           \
  373.         (THIS_  ULONG FAR *                 lpcbEntryID,                \
  374.                 LPENTRYID FAR *             lppEntryID) IPURE;          \
  375.     MAPIMETHOD(SetDefaultDir)                                           \
  376.         (THIS_  ULONG                       cbEntryID,                  \
  377.                 LPENTRYID                   lpEntryID) IPURE;           \
  378.     MAPIMETHOD(GetSearchPath)                                           \
  379.         (THIS_  ULONG                       ulFlags,                    \
  380.                 LPSRowSet FAR *             lppSearchPath) IPURE;       \
  381.     MAPIMETHOD(SetSearchPath)                                           \
  382.         (THIS_  ULONG                       ulFlags,                    \
  383.                 LPSRowSet                   lpSearchPath) IPURE;        \
  384.     MAPIMETHOD(PrepareRecips)                                           \
  385.         (THIS_  ULONG                       ulFlags,                    \
  386.                 LPSPropTagArray             lpPropTagArray,             \
  387.                 LPADRLIST                   lpRecipList) IPURE;         \
  388.  
  389. #undef       INTERFACE
  390. #define      INTERFACE  IAddrBook
  391. DECLARE_MAPI_INTERFACE_(IAddrBook, IMAPIProp)
  392. {
  393.     BEGIN_INTERFACE 
  394.     MAPI_IUNKNOWN_METHODS(PURE)
  395.     MAPI_IMAPIPROP_METHODS(PURE)
  396.     MAPI_IADDRBOOK_METHODS(PURE)
  397. };
  398.  
  399. DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK);
  400.  
  401. /* IProfAdmin Interface ---------------------------------------------------- */
  402.  
  403. /* Flags for CreateProfile */
  404. #define MAPI_DEFAULT_SERVICES           0x00000001
  405.  
  406. /* GetProfileTable */
  407. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  408.  
  409. #define MAPI_IPROFADMIN_METHODS(IPURE)                                  \
  410.     MAPIMETHOD(GetLastError)                                            \
  411.         (THIS_  HRESULT                     hResult,                    \
  412.                 ULONG                       ulFlags,                    \
  413.                 LPMAPIERROR FAR *           lppMAPIError) IPURE;        \
  414.     MAPIMETHOD(GetProfileTable)                                         \
  415.         (THIS_  ULONG                       ulFlags,                    \
  416.                 LPMAPITABLE FAR *           lppTable) IPURE;            \
  417.     MAPIMETHOD(CreateProfile)                                           \
  418.         (THIS_  LPTSTR                      lpszProfileName,            \
  419.                 LPTSTR                      lpszPassword,               \
  420.                 ULONG                       ulUIParam,                  \
  421.                 ULONG                       ulFlags) IPURE;             \
  422.     MAPIMETHOD(DeleteProfile)                                           \
  423.         (THIS_  LPTSTR                      lpszProfileName,            \
  424.                 ULONG                       ulFlags) IPURE;             \
  425.     MAPIMETHOD(ChangeProfilePassword)                                   \
  426.         (THIS_  LPTSTR                      lpszProfileName,            \
  427.                 LPTSTR                      lpszOldPassword,            \
  428.                 LPTSTR                      lpszNewPassword,            \
  429.                 ULONG                       ulFlags) IPURE;             \
  430.     MAPIMETHOD(CopyProfile)                                             \
  431.         (THIS_  LPTSTR                      lpszOldProfileName,         \
  432.                 LPTSTR                      lpszOldPassword,            \
  433.                 LPTSTR                      lpszNewProfileName,         \
  434.                 ULONG                       ulUIParam,                  \
  435.                 ULONG                       ulFlags) IPURE;             \
  436.     MAPIMETHOD(RenameProfile)                                           \
  437.         (THIS_  LPTSTR                      lpszOldProfileName,         \
  438.                 LPTSTR                      lpszOldPassword,            \
  439.                 LPTSTR                      lpszNewProfileName,         \
  440.                 ULONG                       ulUIParam,                  \
  441.                 ULONG                       ulFlags) IPURE;             \
  442.     MAPIMETHOD(SetDefaultProfile)                                       \
  443.         (THIS_  LPTSTR                      lpszProfileName,            \
  444.                 ULONG                       ulFlags) IPURE;             \
  445.     MAPIMETHOD(AdminServices)                                           \
  446.         (THIS_  LPTSTR                      lpszProfileName,            \
  447.                 LPTSTR                      lpszPassword,               \
  448.                 ULONG                       ulUIParam,                  \
  449.                 ULONG                       ulFlags,                    \
  450.                 LPSERVICEADMIN FAR *        lppServiceAdmin) IPURE;     \
  451.  
  452.  
  453. #undef       INTERFACE
  454. #define      INTERFACE  IProfAdmin
  455. DECLARE_MAPI_INTERFACE_(IProfAdmin, IUnknown)
  456. {
  457.     BEGIN_INTERFACE 
  458.     MAPI_IUNKNOWN_METHODS(PURE)
  459.     MAPI_IPROFADMIN_METHODS(PURE)
  460. };
  461.  
  462. /* IMsgServiceAdmin Interface ---------------------------------------------- */
  463.  
  464. /* Values for PR_RESOURCE_FLAGS in message service table */
  465.  
  466. #define SERVICE_DEFAULT_STORE       0x00000001
  467. #define SERVICE_SINGLE_COPY         0x00000002
  468. #define SERVICE_CREATE_WITH_STORE   0x00000004
  469. #define SERVICE_PRIMARY_IDENTITY    0x00000008
  470. #define SERVICE_NO_PRIMARY_IDENTITY 0x00000020
  471.  
  472. /*  GetMsgServiceTable */
  473. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  474.  
  475. /*  GetProviderTable */
  476. /****** MAPI_UNICODE            ((ULONG) 0x80000000) */
  477.  
  478. #define MAPI_IMSGSERVICEADMIN_METHODS(IPURE)                            \
  479.     MAPIMETHOD(GetLastError)                                            \
  480.         (THIS_  HRESULT                     hResult,                    \
  481.                 ULONG                       ulFlags,                    \
  482.                 LPMAPIERROR FAR *           lppMAPIError) IPURE;        \
  483.     MAPIMETHOD(GetMsgServiceTable)                                      \
  484.         (THIS_  ULONG                       ulFlags,                    \
  485.                 LPMAPITABLE FAR *           lppTable) IPURE;            \
  486.     MAPIMETHOD(CreateMsgService)                                        \
  487.         (THIS_  LPTSTR                      lpszService,                \
  488.                 LPTSTR                      lpszDisplayName,            \
  489.                 ULONG                       ulUIParam,                  \
  490.                 ULONG                       ulFlags) IPURE;             \
  491.     MAPIMETHOD(DeleteMsgService)                                        \
  492.         (THIS_  LPMAPIUID                   lpUID) IPURE;               \
  493.     MAPIMETHOD(CopyMsgService)                                          \
  494.         (THIS_  LPMAPIUID                   lpUID,                      \
  495.                 LPTSTR                      lpszDisplayName,            \
  496.                 LPCIID                      lpInterfaceToCopy,          \
  497.                 LPCIID                      lpInterfaceDst,             \
  498.                 LPVOID                      lpObjectDst,                \
  499.                 ULONG                       ulUIParam,                  \
  500.                 ULONG                       ulFlags) IPURE;             \
  501.     MAPIMETHOD(RenameMsgService)                                        \
  502.         (THIS_  LPMAPIUID                   lpUID,                      \
  503.                 ULONG                       ulFlags,                    \
  504.                 LPTSTR                      lpszDisplayName) IPURE;     \
  505.     MAPIMETHOD(ConfigureMsgService)                                     \
  506.         (THIS_  LPMAPIUID                   lpUID,                      \
  507.                 ULONG                       ulUIParam,                  \
  508.                 ULONG                       ulFlags,                    \
  509.                 ULONG                       cValues,                    \
  510.                 LPSPropValue                lpProps) IPURE;             \
  511.     MAPIMETHOD(OpenProfileSection)                                      \
  512.         (THIS_  LPMAPIUID                   lpUID,                      \
  513.                 LPCIID                      lpInterface,                \
  514.                 ULONG                       ulFlags,                    \
  515.                 LPPROFSECT FAR *            lppProfSect) IPURE;         \
  516.     MAPIMETHOD(MsgServiceTransportOrder)                                \
  517.         (THIS_  ULONG                       cUID,                       \
  518.                 LPMAPIUID                   lpUIDList,                  \
  519.                 ULONG                       ulFlags) IPURE;             \
  520.     MAPIMETHOD(AdminProviders)                                          \
  521.         (THIS_  LPMAPIUID                   lpUID,                      \
  522.                 ULONG                       ulFlags,                    \
  523.                 LPPROVIDERADMIN FAR *       lppProviderAdmin) IPURE;    \
  524.     MAPIMETHOD(SetPrimaryIdentity)                                      \
  525.         (THIS_  LPMAPIUID                   lpUID,                      \
  526.                 ULONG                       ulFlags) IPURE;             \
  527.     MAPIMETHOD(GetProviderTable)                                        \
  528.         (THIS_  ULONG                       ulFlags,                    \
  529.                 LPMAPITABLE FAR *           lppTable) IPURE;            \
  530.  
  531.  
  532. #undef       INTERFACE
  533. #define      INTERFACE  IMsgServiceAdmin
  534. DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin, IUnknown)
  535. {
  536.     BEGIN_INTERFACE 
  537.     MAPI_IUNKNOWN_METHODS(PURE)
  538.     MAPI_IMSGSERVICEADMIN_METHODS(PURE)
  539. };
  540.  
  541. #ifdef  __cplusplus
  542. }       /*  extern "C" */
  543. #endif  
  544.  
  545. #ifdef __BORLANDC__
  546.   #include <poppack.h>
  547. #endif
  548.  
  549. #endif /* MAPIX_H */
  550.