home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / adminext.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  9.9 KB  |  304 lines

  1. /**********************************************************************/
  2. /**                         Microsoft Exchange                       **/
  3. /**  Copyright (c) Microsoft Corp. 1986-1996. All Rights Reserved.   **/
  4. /**********************************************************************/
  5.  
  6. /*
  7.     adminext.h
  8.     This file contains the common messages, manifests, types, and
  9.     structures used by Microsoft Exchange Administration Extensions.
  10.  
  11.     NOTE:  You must include windows.h and mapix.h before this file.
  12.  
  13. */
  14.  
  15.  
  16.  
  17. #ifndef _ADMINEXT_H_
  18. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  19. #define _ADMINEXT_H_
  20.  
  21.  
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif
  26.  
  27.  
  28.  
  29. // Miscellanous definitions
  30.  
  31. #define    ADMIN_ExtensionAPIVersion    0x000d
  32.  
  33.  
  34. // List of dialog page IDs passed to the ShowPage proc in the
  35. // extension DLL for approval.
  36.  
  37. // for gateway objects (ObjID_GW)
  38. #define    iddGWGeneral                3020
  39. #define    iddGWPermissions            3500
  40. #define    iddGWSchedule                4011
  41. #define    iddGWConnected_Sites        4020
  42. #define    iddGWAddress_Space            3021
  43. #define    iddGWDelivery_Restrictions    4008
  44. #define    iddGWAdvanced                3022
  45. #define    iddGWImportContainer        3063
  46. #define    iddGWExportContainers        3067
  47. #define iddGWDiagLogSetting            4030
  48.  
  49. // for mail agent objects (ObjID_MA)
  50. #define    iddMAGeneral                4028
  51. #define    iddMAPermissions            3500
  52. #define    iddMADistributionList        4090
  53. #define    iddMAEMailAddresses            4014
  54. #define    iddMADeliveryRestrictions    4008
  55. #define    iddMADeliveryOptions        4007
  56. #define    iddMASecurity                4051
  57. #define    iddMACustomAttributes        4022
  58. #define    iddMASchedule                4011
  59. #define    iddMAAdvanced                4040
  60.  
  61.  
  62.  
  63. typedef struct _ADMIN_ObjectInfo
  64. {
  65.     LPWSTR        szComputerName;            // Computer on which the gateway runs, when applicable
  66.     LPWSTR        szDistinguishedName;    // of the object administered
  67.     LPWSTR        szDNHomeMDB;            // Distinguished name of the server running the home message database
  68.     LPWSTR        szDNHomeMTA;            // Distinguished name of the server running the home message transport agent
  69.     LCID        lcid;                    // locale ID
  70.     UINT        uObjectID;                // object ID code
  71.     HFONT        hfontDialog;            // font handle
  72. } ADMIN_ObjectInfo;
  73.  
  74.  
  75. // Object ID codes
  76. #define ObjID_UK            0        // UnKnown
  77.  
  78. #define ObjID_DSFirst        1        // first DS DOC
  79.  
  80. #define ObjID_EP            2        // Enterprise
  81. #define ObjID_DM            3        // Domain (Site)
  82. #define ObjID_CT            4        // Container
  83. #define ObjID_SV            5        // Server
  84.  
  85.     // Recipients
  86. #define ObjID_MR            6        // Mail Recipients
  87. #define ObjID_MB            7        // Mailbox
  88. #define ObjID_DL            8        // Distribution List
  89. #define ObjID_RR            9        // Remote Recipient
  90. #define ObjID_PF            10        // Public Folder
  91. #define ObjID_MA            11        // Mail Agent
  92.  
  93.     // Connections
  94. #define ObjID_GW            12        // Gateway
  95. #define ObjID_MGW            13        // Special Gateway for Goalline
  96. #define ObjID_DXAREQ        14        // DXA requestor, was Remote DXA
  97. #define ObjID_DXASV            15        // DXA Site server
  98. #define ObjID_DXACONN        16        // DXA Server Connection
  99. #define ObjID_ISC            17        // Site Connector
  100. #define ObjID_LNKRAS        18        // Dynamic RAS Connector
  101. #define ObjID_LNKTCP        19        // TCP (RFC1006) X.400 Connector
  102. #define ObjID_LNKTP4        20        // TP4 X.400 Connector
  103. #define ObjID_LNKX25        21        // X.25 X.400 Connector
  104. #define ObjID_DRC            22        // Directory Replication Connector
  105.  
  106.     // Server Objects
  107. #define ObjID_MTA            23        // MTA
  108. #define ObjID_DSA            24        // Directory
  109. #define ObjID_MDB            26        // Private Information Store
  110. #define ObjID_PMDB            27        // Public Information Store
  111. #define ObjID_LDXA            28        // Local DXA
  112. #define ObjID_SAA            29        // System Attendant
  113. #define ObjID_STKRAS        30        // RAS MTA Transport Stack
  114. #define ObjID_STKTCP        31        // TCP (RFC1006) MTA Transport Stack
  115. #define ObjID_STKTP4        32        // TP4 MTA Transport Stack
  116. #define ObjID_STKX25        33        // X.25 MTA Transport Stack
  117.  
  118.     // Monitor Configurations
  119. #define ObjID_MSV            34        // Monitoring Server Configuration (DS)
  120. #define ObjID_MLK            35        // Monitoring Link Configuration (DS)
  121.  
  122.     // Templates
  123. #define ObjID_ATP            36        // Address Type
  124. #define ObjID_ATL            37        // Address Template
  125. #define ObjID_DTL            38        // Display Template
  126.  
  127.     // Schema Objects
  128. #define ObjID_Schema        39        // The Schema container (DMD)
  129. #define ObjID_SchemaAttr    40        // Schema Attribute
  130. #define ObjID_SchemaObj        41        // Schema Object
  131.  
  132.     // Site Configurations
  133. #define ObjID_ENC            42        // Encryption Configuration
  134. #define ObjID_SADR            43        // Site Addressing
  135. #define ObjID_SDSA            44        // Site Directory Configuration
  136. #define ObjID_SMDB            45        // Site Information Store Configuration
  137. #define ObjID_SMTA            46        // Site MTA Configuration
  138.  
  139. #define ObjID_ADDIN            47        // Add-In
  140. #define ObjID_EXT            48        // Admin Extension
  141.  
  142.  
  143.  
  144.  
  145.  
  146. typedef struct _ADMIN_SheetInfo
  147. {
  148.     HINSTANCE    hInstance;
  149.     UINT        iddDialog;        // To pass to MAKEINTRESOURCE()
  150.     DLGPROC        lpfnDlgProc;
  151.     UINT        idsName;        // For LoadString()
  152.     LPARAM        lParam;            // Passed to DlgProc on WM_INITDIALOG
  153.     LANGID         langid;            // language ID of dialog to be loaded
  154. } ADMIN_SheetInfo;
  155.  
  156.  
  157. /*********************************************************************************/
  158. /*********************************************************************************/
  159.  
  160. // Functions implemented by the Extension DLL
  161. // and called by the Microsoft Exchange Administrator program.
  162.  
  163. typedef BOOL (PASCAL * PADMIN_InstallExtension) (ADMIN_ObjectInfo * poi);
  164. typedef BOOL (PASCAL * PADMIN_DeinstallExtension) (ADMIN_ObjectInfo * poi);
  165. typedef BOOL (PASCAL * PADMIN_ShowPage) (UINT iddAdminPage);
  166. typedef INT (PASCAL * PADMIN_StartPage) (void);
  167. typedef BOOL (PASCAL * PADMIN_InitSheet)
  168.             (    ADMIN_ObjectInfo * poi,
  169.                 ULONG fFlags,
  170.                 ADMIN_SheetInfo ** ppsi,
  171.                 UINT * pcsi,
  172.                 VOID ** ppvExtensionData);
  173.  
  174. // PADMIN_InitSheet definitions for fFlags
  175. #define fxfReadOnly                    0x00000001
  176. // high byte of fFlags reserved as private for extension dll writers to use as they see fit.
  177. #define MaskExtensionPrivateFlags    0x00ffffff
  178.  
  179. /*********************************************************************************/
  180. /*********************************************************************************/
  181.  
  182. // FSetActive()   typedef BOOL (PASCAL * PADMIN_RefreshDisplay) (VOID * pvExtensionData, HWND hwnd);
  183. typedef BOOL (PASCAL * PADMIN_HasHelp) (VOID * pvExtensionData, HWND hwnd);
  184. typedef VOID (PASCAL * PADMIN_DoHelp) (VOID * pvExtensionData, HWND hwnd);
  185. typedef BOOL (PASCAL * PADMIN_SaveData) (VOID * pvExtensionData, HWND hwnd);
  186. typedef BOOL (PASCAL * PADMIN_CommitData) (VOID * pvExtensionData, HWND hwnd);
  187.  
  188. typedef VOID (PASCAL * PADMIN_DeinitSheet)
  189.                 (VOID * pvExtensionData);
  190.  
  191.  
  192. // The pointers in this structure (except pfnInitSheet) can be NULL
  193. // if a pointer is null, no call is made.
  194. typedef struct _ADMIN_ExtensionFunction
  195. {
  196.     int                            nAPIVersion;
  197.     PADMIN_InstallExtension        pfnInstallExtension;
  198.     PADMIN_DeinstallExtension    pfnDeinstallExtension;
  199.     PADMIN_InitSheet            pfnInitSheet;
  200.     PADMIN_ShowPage                pfnShowPage;
  201.     PADMIN_StartPage            pfnStartPage;
  202.     PADMIN_HasHelp                pfnHasHelp;
  203.     PADMIN_DoHelp                pfnDoHelp;
  204.     PADMIN_SaveData                pfnSaveData;
  205.     PADMIN_CommitData            pfnCommitData;
  206.     PADMIN_DeinitSheet            pfnDeinitSheet;
  207. } ADMIN_ExtensionFunction;
  208.  
  209.  
  210.  
  211. // Functions implemented by the Microsoft Exchange Administrator Program
  212. // and called by the Extension DLL.
  213.  
  214. typedef RC (PASCAL * PADMIN_GetObjectDataSize)
  215.                 (HWND hwnd, LPWSTR wszBlobName, UINT * pcb);
  216.  
  217. typedef RC (PASCAL * PADMIN_GetObjectData)
  218.                 (HWND hwnd, LPWSTR wszBlobName, BYTE * pb, UINT cb);
  219.  
  220. typedef RC (PASCAL * PADMIN_SetObjectData)
  221.                 (HWND hwnd, BYTE * pb, UINT cb, BOOL fNew);
  222.  
  223. // These 2 APIs take WCHAR *, NOT TCHAR!!!
  224. // szServiceName is the SHORT name of the service.
  225. typedef BOOL (PASCAL * PADMIN_AddService)
  226.                 (HWND hwnd, LPWSTR wszServiceName);
  227. typedef BOOL (PASCAL * PADMIN_RemoveService)
  228.                 (HWND hwnd, LPWSTR wszServiceName);
  229.  
  230. typedef VOID (PASCAL * PADMIN_InfoHasChanged)
  231.                 (HWND hwnd);
  232.  
  233. typedef VOID (PASCAL * PADMIN_SetIcon)
  234.                 (HWND hwnd, int id);
  235.  
  236. typedef VOID (PASCAL * PADMIN_SetTitle)
  237.                 (HWND hwnd, int id);
  238.  
  239. typedef BOOL (PASCAL * PADMIN_LoadDialogResource)
  240.                 (HINSTANCE hinst, UINT iddDialog, LANGID langid, BYTE ** ppbDialog);
  241.  
  242. // *ppbDialog will be set to NULL after being freed in this call
  243. typedef VOID (PASCAL * PADMIN_FreeDialogResource)
  244.                 (BYTE ** ppbDialog);
  245.  
  246. /*
  247.  *        psz is a pointer to an array of string pointers. The array is
  248.  *        cstr elements long.
  249.  *            Name 0:        psz[0], etc.
  250.  *        The extension is responsible for calling FreeNameList to reelease the memory
  251.  */
  252. typedef BOOL (PASCAL * PADMIN_GetNameList)
  253.                 (HWND hwnd, int * pcstr, LPWSTR ** ppsz);
  254. typedef void (PASCAL * PADMIN_FreeNameList)
  255.                 (int cstr, LPWSTR * psz);
  256. /*
  257.  *    Admin will make a copy of the strings, so the extension can release the memory
  258.  *    it allocated when the SetProxy call returns.
  259.  */
  260. typedef BOOL (PASCAL * PADMIN_SetNameList)
  261.                 (HWND hwnd, int cstr, LPWSTR * psz);
  262. // NOTE on both GetNameList and SetNameList: Admin will issue the error message if appropriate
  263.  
  264.  
  265. typedef struct _ADMIN_AdministratorFunction
  266. {
  267.     PADMIN_GetObjectDataSize    pfnGetObjectDataSize;
  268.     PADMIN_GetObjectData        pfnGetObjectData;
  269.     PADMIN_SetObjectData        pfnSetObjectData;
  270.     PADMIN_AddService            pfnAddService;
  271.     PADMIN_RemoveService        pfnRemoveService;
  272.     PADMIN_InfoHasChanged        pfnInfoHasChanged;
  273.     PADMIN_SetIcon                pfnSetIcon;
  274.     PADMIN_SetTitle                pfnSetTitle;
  275.     PADMIN_GetNameList            pfnGetNameList;
  276.     PADMIN_FreeNameList            pfnFreeNameList;
  277.     PADMIN_SetNameList            pfnSetNameList;
  278.     PADMIN_LoadDialogResource    pfnLoadDialogResource;
  279.     PADMIN_FreeDialogResource    pfnFreeDialogResource;
  280. } ADMIN_AdministratorFunction;
  281.  
  282. typedef struct _ADMIN_AdministratorConnections
  283. {
  284.     IMAPISession *        psesMapi;
  285.     IAddrBook *            pab;
  286.     IABContainer *        pabContainer;
  287. } ADMIN_AdministratorConnections;
  288.  
  289.  
  290. // Initialization function where the API is clarified.
  291.  
  292. typedef VOID (PASCAL * PADMIN_Initialize)
  293.             (    ADMIN_AdministratorConnections * pac,
  294.                 ADMIN_AdministratorFunction * pAdminFunction,
  295.                 ADMIN_ExtensionFunction ** ppExtensionFunction);
  296.  
  297.  
  298. #ifdef __cplusplus
  299. }
  300. #endif
  301.  
  302. #pragma option pop /*P_O_Pop*/
  303. #endif        // #ifndef _ADMINEXT_H_
  304.