home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / iaccess.idl < prev    next >
Text File  |  1998-04-25  |  3KB  |  122 lines

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1994 - 1997.
  5. //
  6. //  File:       iaccess.idl
  7. //
  8. //  Contents:   definitions of access and audit control interfaces
  9. //
  10. //----------------------------------------------------------------------------
  11.  
  12. import "unknwn.idl";
  13. import "accctrl.h";
  14.  
  15. /****************************************************************************
  16.  *  Storage access control interface
  17.  ****************************************************************************/
  18.  
  19. // All nested structures are allocated in the same block of memory.
  20. // Thus these types are freed with a single call to CoTaskMemFree.
  21. typedef PACTRL_ACCESSW PACTRL_ACCESSW_ALLOCATE_ALL_NODES;
  22. typedef PACTRL_AUDITW  PACTRL_AUDITW_ALLOCATE_ALL_NODES;
  23.  
  24. interface IAccessControl;
  25. [
  26.     object,
  27.     uuid(EEDD23E0-8410-11CE-A1C3-08002B2B8D8F),
  28.     pointer_default(unique)
  29. ]
  30. interface IAccessControl : IUnknown
  31. {
  32.  
  33.     HRESULT GrantAccessRights
  34.     (
  35.         [in] PACTRL_ACCESSW     pAccessList
  36.     );
  37.  
  38.     HRESULT SetAccessRights
  39.     (
  40.         [in] PACTRL_ACCESSW     pAccessList
  41.     );
  42.  
  43.     HRESULT SetOwner
  44.     (
  45.         [in] PTRUSTEEW          pOwner,
  46.         [in] PTRUSTEEW          pGroup
  47.     );
  48.  
  49.     HRESULT RevokeAccessRights
  50.     (
  51.         [in] LPWSTR             lpProperty,
  52.         [in] ULONG              cTrustees,
  53.         [in, size_is(cTrustees)] TRUSTEEW       prgTrustees[]
  54.     );
  55.  
  56.     HRESULT GetAllAccessRights
  57.     (
  58.         [in] LPWSTR                              lpProperty,
  59.         [out] PACTRL_ACCESSW_ALLOCATE_ALL_NODES *ppAccessList,
  60.         [out] PTRUSTEEW                         *ppOwner,
  61.         [out] PTRUSTEEW                         *ppGroup
  62.     );
  63.  
  64.  
  65.     HRESULT IsAccessAllowed
  66.     (
  67.         [in] PTRUSTEEW          pTrustee,
  68.         [in] LPWSTR             lpProperty,
  69.         [in] ACCESS_RIGHTS      AccessRights,
  70.         [out] BOOL             *pfAccessAllowed
  71.     );
  72.  
  73. }
  74.  
  75. /****************************************************************************
  76.  *  Storage audit control interface
  77.  ****************************************************************************/
  78.  
  79. interface IAuditControl;
  80. [
  81.     object,
  82.     uuid(1da6292f-bc66-11ce-aae3-00aa004c2737),
  83.     pointer_default(unique)
  84. ]
  85.  
  86. interface IAuditControl : IUnknown
  87. {
  88.     HRESULT GrantAuditRights
  89.     (
  90.         [in] PACTRL_AUDITW      pAuditList
  91.     );
  92.  
  93.     HRESULT SetAuditRights
  94.     (
  95.         [in] PACTRL_AUDITW      pAuditList
  96.     );
  97.  
  98.     HRESULT RevokeAuditRights
  99.     (
  100.         [in] LPWSTR             lpProperty,
  101.         [in] ULONG              cTrustees,
  102.         [in, size_is(cTrustees)] TRUSTEEW    prgTrustees []
  103.     );
  104.  
  105.     HRESULT GetAllAuditRights
  106.     (
  107.         [in]  LPWSTR            lpProperty,
  108.         [out] PACTRL_AUDITW    *ppAuditList
  109.     );
  110.  
  111.     //
  112.     // Determines if the given trustee with the state audit rights will generate an audit event if the object is accessed.
  113.     //
  114.     HRESULT IsAccessAudited
  115.     (
  116.         [in]  PTRUSTEEW         pTrustee,
  117.         [in]  ACCESS_RIGHTS     AuditRights,
  118.         [out] BOOL             *pfAccessAudited
  119.     );
  120. }
  121.  
  122.