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