home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / ACLCLS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  3.7 KB  |  146 lines

  1. // --aclcls.h------------------------------------------------------------------
  2. //
  3. // Interface to library: aclcls.
  4. //
  5. // Copyright 1986 - 1998 Microsoft Corporation. All rights reserved.
  6. //
  7. // ----------------------------------------------------------------------------
  8.  
  9. #if !defined(_ACLCLS_H_)
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  11. #define _ACLCLS_H_
  12.  
  13.  
  14. // $$--IExchangeFolderACLs-----------------------------------------------------
  15. //
  16. // Definition of interface for folder ACLs class CFolderACLs.
  17. //
  18. // ----------------------------------------------------------------------------
  19.  
  20. #undef         INTERFACE
  21. #define         INTERFACE  IExchangeFolderACLs
  22.  
  23. // Manifest for cursor position indicating we are at the end of the ACLs table.
  24.  
  25. #define    ACL_PAST_END        ((LONG) -1)
  26.  
  27.  
  28. // Special ACL positions.  The special ACL's at these position may not be
  29. // deleted, and there are also special rules (coming from Exchange) with
  30. // regard to how rights will be modified.  Also, other ACL's may not be inserted
  31. // at these positions.
  32.  
  33. #define    ACL_POS_DEFAULT        ((LONG) 0)
  34. #define    ACL_POS_CREATOR        ((LONG) 1)
  35.  
  36. DECLARE_INTERFACE_(IExchangeFolderACLs, IUnknown)
  37. {
  38. #ifndef NO_BASEINTERFACE_FUNCS
  39.  
  40.     /* IUnknown methods */
  41.  
  42.     STDMETHOD(QueryInterface)(
  43.         THIS_
  44.         REFIID                    riid,
  45.         LPVOID FAR *            ppvObj
  46.         )                                        PURE;
  47.  
  48.     STDMETHOD_(ULONG, AddRef)(
  49.         THIS
  50.         )                                        PURE;
  51.  
  52.     STDMETHOD_(ULONG, Release)(
  53.         THIS
  54.         )                                        PURE;
  55.  
  56. #endif
  57.  
  58.     /* IExchangeFolderACLs methods */
  59.  
  60.     STDMETHOD(HrDelete)(
  61.         THIS
  62.         )                                                    PURE;
  63.  
  64.     STDMETHOD(HrGet)(
  65.         THIS_
  66.         LPLONG                    lplRights,
  67.         LPSTR FAR *                lppszDisplayName,
  68.         ULONG FAR *                lpcbentryid,
  69.         LPENTRYID FAR *            lppentryid
  70.         )                                                    PURE;
  71.  
  72.     STDMETHOD(HrInsert)(
  73.         THIS_
  74.         LONG                    lRights,
  75.         LPSTR                    lpszDisplayName,
  76.         ULONG                    cbentryid,
  77.         LPENTRYID                lpentryid,
  78.         LPLONG                    lplRights
  79.         )                                                    PURE;
  80.  
  81.     STDMETHOD(HrModify)(
  82.         THIS_
  83.         LONG                    lRights,
  84.         LPLONG                    lplRights
  85.         )                                                    PURE;
  86.  
  87.     STDMETHOD(HrSeek)(
  88.         THIS_
  89.         LONG                    lPos
  90.         )                                                    PURE;
  91.  
  92.     STDMETHOD(HrTell)(
  93.         THIS_
  94.         LPLONG                    lplPos
  95.         )                                                    PURE;
  96. };
  97.  
  98. // $$--LPFOLDERACLS------------------------------------------------------------
  99. //
  100. // Pointer to IExchangeFolderACLs interface.
  101. //
  102. // ----------------------------------------------------------------------------
  103.  
  104. typedef IExchangeFolderACLs FAR * LPFOLDERACLS;
  105.  
  106. //
  107. // Helper functions defined in module ACLCLS.
  108. //
  109.  
  110. // $--HrFolderACLsOpen---------------------------------------------------------
  111. //
  112. // DESCRIPTION:    Get a pointer to an object which implements the
  113. //                IExchangeFolderACLs interface defined in aclcls.h.
  114. //
  115. // INPUT:
  116. //
  117. //  [lpSession]         -- Pointer to MAPI session.
  118. //    [lpMDB]                -- Pointer to message store containing folder.
  119. //  [cbentryid]            -- Number of bytes in folder's entry identifier.
  120. //  [lpentryid]            -- Folder's entry identifier.
  121. //
  122. // OUTPUT:
  123. //
  124. //  [lppFolderACLs]        -- Pointer to object which supports interface.
  125. //                           NULL if none.
  126. //
  127. // RETURNS:     NOERROR            if successful;
  128. //                E_INVALIDARG    if bad input;
  129. //                E_OUTOFMEMORY    if not enough memory;
  130. //                E_NOINTERFACE    if acl table does not exist on folder;
  131. //              E_FAIL             otherwise.
  132. //
  133. //-----------------------------------------------------------------------------
  134.  
  135. STDAPI
  136. HrFolderACLsOpen(                                // RETURNS: HRESULT
  137.     IN      LPMAPISESSION       lpSession,      // MAPI session pointer
  138.     IN        LPMDB                lpMDB,            // MAPI MDB store ptr
  139.     IN        ULONG                cbentryid,        // # bytes in entry ID
  140.     IN        LPENTRYID            lpentryid,        // entry ID ptr
  141.     OUT        LPFOLDERACLS FAR *    lppFolderACLs    // IExchangeFolderACLs ptr ptr
  142.     );
  143.  
  144. #pragma option pop /*P_O_Pop*/
  145. #endif
  146.