Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
4.0 KiB

  1. [
  2. object,
  3. uuid (2e9b11a0-d532-11cf-aef3-00aa0044fb89),
  4. version(1.0),
  5. pointer_default(unique)
  6. ]
  7. interface IAccessControlTest : IUnknown
  8. {
  9. import "unknwn.idl";
  10. #pragma midl_echo("#ifndef UNICODE")
  11. #pragma midl_echo("#define UNICODE")
  12. #pragma midl_echo("#define UNICODE_NOT_DEFINED")
  13. #pragma midl_echo("#endif")
  14. #pragma midl_echo("#ifndef __ACCESS_CONTROL__")
  15. #pragma midl_echo("#define __ACCESS_CONTROL__")
  16. #include "accctrl.h";
  17. #pragma midl_echo("#endif")
  18. #pragma midl_echo("#ifdef UNICODE_NOT_DEFINED")
  19. #pragma midl_echo("#undef UNICODE")
  20. #pragma midl_echo("#undef UNICODE_NOT_DEFINED")
  21. #pragma midl_echo("#endif")
  22. // In order to make sure that the SID in the trustee structure gets marshalled
  23. // properly, we introduce the following union type
  24. typedef struct tagSSID_IDENTIFIER_AUTHORITY{
  25. UCHAR Value[6];
  26. } SSID_IDENTIFIER_AUTHORITY;
  27. typedef struct tagSTREAM_SID
  28. {
  29. UCHAR Revision;
  30. UCHAR SubAuthorityCount;
  31. SSID_IDENTIFIER_AUTHORITY IdentifierAuthority;
  32. [size_is(SubAuthorityCount)]ULONG SubAuthority[*];
  33. }STREAM_SID, *PSTREAM_SID;
  34. typedef [switch_type(TRUSTEE_FORM)] union _TRUSTEE_ID
  35. {
  36. [case(TRUSTEE_IS_NAME)]
  37. LPWSTR pwszTrusteeName;
  38. [case(TRUSTEE_IS_SID)]
  39. PSTREAM_SID pSID;
  40. [default]
  41. ;
  42. } TRUSTEE_ID;
  43. typedef struct _E_TRUSTEE *PE_TRUSTEE;
  44. typedef struct _E_TRUSTEE
  45. {
  46. PE_TRUSTEE pMultipleTrustee;
  47. MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
  48. TRUSTEE_FORM TrusteeForm;
  49. TRUSTEE_TYPE TrusteeType;
  50. [switch_is(TrusteeForm)] TRUSTEE_ID TrusteeID;
  51. } E_TRUSTEE;
  52. typedef struct _E_ACCESS_REQUEST
  53. {
  54. DWORD grfAccessPermissions;
  55. E_TRUSTEE Trustee;
  56. } E_ACCESS_REQUEST, *PE_ACCESS_REQUEST;
  57. typedef struct _E_EXPLICIT_ACCESS
  58. {
  59. DWORD grfAccessPermissions;
  60. ACCESS_MODE grfAccessMode;
  61. DWORD grfInheritance;
  62. E_TRUSTEE Trustee;
  63. } E_EXPLICIT_ACCESS, *PE_EXPLICIT_ACCESS;
  64. HRESULT TestServer
  65. (
  66. [in] LPSTR pszTestString
  67. );
  68. HRESULT GetClassID
  69. (
  70. [out] CLSID *pClassID,
  71. [out] DOUBLE *pdMillisec
  72. );
  73. HRESULT InitNewACL
  74. (
  75. [out] DOUBLE *pdMillisec
  76. );
  77. HRESULT LoadACL
  78. (
  79. [in] LPCSTR pszFilename,
  80. [out] DOUBLE *pdMillisec
  81. );
  82. HRESULT SaveACL
  83. (
  84. [in] LPCSTR pszFilename,
  85. [in] BOOL fClearDirty,
  86. [out] ULONG *pulBytesWritten,
  87. [out] DOUBLE *pdMillisec
  88. );
  89. HRESULT GetSizeMax
  90. (
  91. [out] ULONG *pcdSize,
  92. [out] DOUBLE *pdMillisec
  93. );
  94. HRESULT IsDirty
  95. (
  96. [out] DOUBLE *pdMillisec
  97. );
  98. HRESULT GrantAccessRights
  99. (
  100. [in] ULONG cCount,
  101. [in, size_is(cCount)] E_ACCESS_REQUEST *pAccessRequestList,
  102. [out] DOUBLE *pdMillisec
  103. );
  104. HRESULT DenyAccessRights
  105. (
  106. [in] ULONG cCount,
  107. [in, size_is(cCount)] E_ACCESS_REQUEST pAccessRequestList[],
  108. [out] DOUBLE *pdMillisec
  109. );
  110. HRESULT SetAccessRights
  111. (
  112. [in] ULONG cCount,
  113. [in, size_is(cCount)] E_ACCESS_REQUEST pAccessRequestList[],
  114. [out] DOUBLE *pdMillisec
  115. );
  116. HRESULT ReplaceAllAccessRights
  117. (
  118. [in] ULONG cCount,
  119. [in, size_is(cCount)] E_EXPLICIT_ACCESS pExplicitAccessList[],
  120. [out] DOUBLE *pdMillisec
  121. );
  122. HRESULT RevokeExplicitAccessRights
  123. (
  124. [in] ULONG cCount,
  125. [in, size_is(cCount)] E_TRUSTEE pTrustee[],
  126. [out] DOUBLE *pdMillisec
  127. );
  128. HRESULT IsAccessPermitted
  129. (
  130. [in] E_TRUSTEE *pTrustee,
  131. [in] DWORD grfAccessPermissions,
  132. [out] DOUBLE *pdMillisec
  133. );
  134. HRESULT GetEffectiveAccessRights
  135. (
  136. [in] E_TRUSTEE *pTrustee,
  137. [out] DWORD *pdwRights,
  138. [out] DOUBLE *pdMillisec
  139. );
  140. HRESULT GetExplicitAccessRights
  141. (
  142. [out] ULONG *pcCount,
  143. [out, size_is(,*pcCount)] PE_EXPLICIT_ACCESS *ppExplicitAccessList,
  144. [out] DOUBLE *pdMillisec
  145. );
  146. HRESULT RevertAccessRights
  147. (
  148. );
  149. HRESULT CommitAccessRights
  150. (
  151. [in] DWORD grfCommitFlags
  152. );
  153. }