windows-nt/Source/XPSP1/NT/com/oleutest/accctrl/idl/oactest.idl
2020-09-26 16:20:57 +08:00

186 lines
4 KiB
Plaintext

[
object,
uuid (2e9b11a0-d532-11cf-aef3-00aa0044fb89),
version(1.0),
pointer_default(unique)
]
interface IAccessControlTest : IUnknown
{
import "unknwn.idl";
#pragma midl_echo("#ifndef UNICODE")
#pragma midl_echo("#define UNICODE")
#pragma midl_echo("#define UNICODE_NOT_DEFINED")
#pragma midl_echo("#endif")
#pragma midl_echo("#ifndef __ACCESS_CONTROL__")
#pragma midl_echo("#define __ACCESS_CONTROL__")
#include "accctrl.h";
#pragma midl_echo("#endif")
#pragma midl_echo("#ifdef UNICODE_NOT_DEFINED")
#pragma midl_echo("#undef UNICODE")
#pragma midl_echo("#undef UNICODE_NOT_DEFINED")
#pragma midl_echo("#endif")
// In order to make sure that the SID in the trustee structure gets marshalled
// properly, we introduce the following union type
typedef struct tagSSID_IDENTIFIER_AUTHORITY{
UCHAR Value[6];
} SSID_IDENTIFIER_AUTHORITY;
typedef struct tagSTREAM_SID
{
UCHAR Revision;
UCHAR SubAuthorityCount;
SSID_IDENTIFIER_AUTHORITY IdentifierAuthority;
[size_is(SubAuthorityCount)]ULONG SubAuthority[*];
}STREAM_SID, *PSTREAM_SID;
typedef [switch_type(TRUSTEE_FORM)] union _TRUSTEE_ID
{
[case(TRUSTEE_IS_NAME)]
LPWSTR pwszTrusteeName;
[case(TRUSTEE_IS_SID)]
PSTREAM_SID pSID;
[default]
;
} TRUSTEE_ID;
typedef struct _E_TRUSTEE *PE_TRUSTEE;
typedef struct _E_TRUSTEE
{
PE_TRUSTEE pMultipleTrustee;
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
TRUSTEE_FORM TrusteeForm;
TRUSTEE_TYPE TrusteeType;
[switch_is(TrusteeForm)] TRUSTEE_ID TrusteeID;
} E_TRUSTEE;
typedef struct _E_ACCESS_REQUEST
{
DWORD grfAccessPermissions;
E_TRUSTEE Trustee;
} E_ACCESS_REQUEST, *PE_ACCESS_REQUEST;
typedef struct _E_EXPLICIT_ACCESS
{
DWORD grfAccessPermissions;
ACCESS_MODE grfAccessMode;
DWORD grfInheritance;
E_TRUSTEE Trustee;
} E_EXPLICIT_ACCESS, *PE_EXPLICIT_ACCESS;
HRESULT TestServer
(
[in] LPSTR pszTestString
);
HRESULT GetClassID
(
[out] CLSID *pClassID,
[out] DOUBLE *pdMillisec
);
HRESULT InitNewACL
(
[out] DOUBLE *pdMillisec
);
HRESULT LoadACL
(
[in] LPCSTR pszFilename,
[out] DOUBLE *pdMillisec
);
HRESULT SaveACL
(
[in] LPCSTR pszFilename,
[in] BOOL fClearDirty,
[out] ULONG *pulBytesWritten,
[out] DOUBLE *pdMillisec
);
HRESULT GetSizeMax
(
[out] ULONG *pcdSize,
[out] DOUBLE *pdMillisec
);
HRESULT IsDirty
(
[out] DOUBLE *pdMillisec
);
HRESULT GrantAccessRights
(
[in] ULONG cCount,
[in, size_is(cCount)] E_ACCESS_REQUEST *pAccessRequestList,
[out] DOUBLE *pdMillisec
);
HRESULT DenyAccessRights
(
[in] ULONG cCount,
[in, size_is(cCount)] E_ACCESS_REQUEST pAccessRequestList[],
[out] DOUBLE *pdMillisec
);
HRESULT SetAccessRights
(
[in] ULONG cCount,
[in, size_is(cCount)] E_ACCESS_REQUEST pAccessRequestList[],
[out] DOUBLE *pdMillisec
);
HRESULT ReplaceAllAccessRights
(
[in] ULONG cCount,
[in, size_is(cCount)] E_EXPLICIT_ACCESS pExplicitAccessList[],
[out] DOUBLE *pdMillisec
);
HRESULT RevokeExplicitAccessRights
(
[in] ULONG cCount,
[in, size_is(cCount)] E_TRUSTEE pTrustee[],
[out] DOUBLE *pdMillisec
);
HRESULT IsAccessPermitted
(
[in] E_TRUSTEE *pTrustee,
[in] DWORD grfAccessPermissions,
[out] DOUBLE *pdMillisec
);
HRESULT GetEffectiveAccessRights
(
[in] E_TRUSTEE *pTrustee,
[out] DWORD *pdwRights,
[out] DOUBLE *pdMillisec
);
HRESULT GetExplicitAccessRights
(
[out] ULONG *pcCount,
[out, size_is(,*pcCount)] PE_EXPLICIT_ACCESS *ppExplicitAccessList,
[out] DOUBLE *pdMillisec
);
HRESULT RevertAccessRights
(
);
HRESULT CommitAccessRights
(
[in] DWORD grfCommitFlags
);
}