File Index Symbol Index

/******************************************************************************** * * * securitybaseapi.h -- ApiSet Contract for api-ms-win-security-base-l1 * * * * Copyright (c) Microsoft Corporation. All rights reserved. * * * ********************************************************************************/
#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER
#ifndef _APISECUREBASE_
#define _APISECUREBASE_
#include <apiset.h>
#include <apisetcconv.h>
#include <minwindef.h>
#include <minwinbase.h>
#ifdef __cplusplus
extern
"C"
{
#endif
//
//
// Security APIs
//
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
AccessCheck
( );
BOOL
AccessCheckAndAuditAlarmW
( );
#ifdef UNICODE
#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW #endif
BOOL
AccessCheckByType
( );
BOOL
AccessCheckByTypeResultList
( );
BOOL
AccessCheckByTypeAndAuditAlarmW
( );
#ifdef UNICODE
#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW #endif
BOOL
AccessCheckByTypeResultListAndAuditAlarmW
( );
#ifdef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmW #endif
BOOL
AccessCheckByTypeResultListAndAuditAlarmByHandleW
( );
#ifdef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleW #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
AddAccessAllowedAce
( );
BOOL
AddAccessAllowedAceEx
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
AddAccessAllowedObjectAce
( );
BOOL
AddAccessDeniedAce
( );
BOOL
AddAccessDeniedAceEx
( );
BOOL
AddAccessDeniedObjectAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
AddAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
AddAuditAccessAce
( );
BOOL
AddAuditAccessAceEx
( );
BOOL
AddAuditAccessObjectAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
BOOL
AddMandatoryAce
( );
#endif /* _WIN32_WINNT >= 0x0600 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
AddResourceAttributeAce
( );
BOOL
AddScopedPolicyIDAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
AdjustTokenGroups
( );
BOOL
AdjustTokenPrivileges
( );
BOOL
AllocateAndInitializeSid
( );
BOOL
AllocateLocallyUniqueId
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
AreAllAccessesGranted
( );
BOOL
AreAnyAccessesGranted
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
CheckTokenMembership
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
CheckTokenCapability
( );
BOOL
GetAppContainerAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
CheckTokenMembershipEx
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
ConvertToAutoInheritPrivateObjectSecurity
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
CopySid
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
CreatePrivateObjectSecurity
( );
BOOL
CreatePrivateObjectSecurityEx
( );
BOOL
CreatePrivateObjectSecurityWithMultipleInheritance
( );
BOOL
CreateRestrictedToken
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0501)
_Success_(return != FALSE)
BOOL
CreateWellKnownSid
( );
_Success_(return != FALSE)
BOOL
EqualDomainSid
( );
#endif //(_WIN32_WINNT >= 0x0501)
BOOL
DeleteAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
DestroyPrivateObjectSecurity
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
DuplicateToken
( );
BOOL
DuplicateTokenEx
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
EqualPrefixSid
( );
BOOL
EqualSid
( );
BOOL
FindFirstFreeAce
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
PVOID
FreeSid
( );
BOOL
GetAce
( );
BOOL
GetAclInformation
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
GetFileSecurityW
( );
#ifdef UNICODE
#define GetFileSecurity GetFileSecurityW #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
GetKernelObjectSecurity
( );
_Post_satisfies_(return >= 8 && return <= SECURITY_MAX_SID_SIZE)
_Success_(1)
DWORD
GetLengthSid
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE)
BOOL
GetPrivateObjectSecurity
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
GetSecurityDescriptorControl
( );
BOOL
GetSecurityDescriptorDacl
( );
BOOL
GetSecurityDescriptorGroup
( );
DWORD
GetSecurityDescriptorLength
( );
BOOL
GetSecurityDescriptorOwner
( );
DWORD
GetSecurityDescriptorRMControl
( );
BOOL
GetSecurityDescriptorSacl
( );
PSID_IDENTIFIER_AUTHORITY
GetSidIdentifierAuthority
( );
DWORD
GetSidLengthRequired
( );
PDWORD
GetSidSubAuthority
( );
PUCHAR
GetSidSubAuthorityCount
( );
BOOL
GetTokenInformation
( );
#if (_WIN32_WINNT >= 0x0501)
_Success_(return != FALSE)
BOOL
GetWindowsAccountDomainSid
( );
#endif //(_WIN32_WINNT >= 0x0501)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
ImpersonateAnonymousToken
( );
_Must_inspect_result_
BOOL
ImpersonateLoggedOnUser
( );
_Must_inspect_result_
BOOL
ImpersonateSelf
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
InitializeAcl
( );
BOOL
InitializeSecurityDescriptor
( );
BOOL
InitializeSid
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
IsTokenRestricted
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
IsValidAcl
( );
BOOL
IsValidSecurityDescriptor
( );
BOOL
IsValidSid
( );
#if (_WIN32_WINNT >= 0x0501)
BOOL
IsWellKnownSid
( );
#endif // (_WIN32_WINNT >= 0x0501)
_Success_(return != FALSE)
BOOL
MakeAbsoluteSD
( );
_Success_(return != FALSE)
BOOL
MakeSelfRelativeSD
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
MapGenericMask
( );
BOOL
ObjectCloseAuditAlarmW
( );
#ifdef UNICODE
#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW #endif
BOOL
ObjectDeleteAuditAlarmW
( );
#ifdef UNICODE
#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW #endif
BOOL
ObjectOpenAuditAlarmW
( );
#ifdef UNICODE
#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW #endif
BOOL
ObjectPrivilegeAuditAlarmW
( );
#ifdef UNICODE
#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW #endif
BOOL
PrivilegeCheck
( );
BOOL
PrivilegedServiceAuditAlarmW
( );
#ifdef UNICODE
#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW #endif
#if (_WIN32_WINNT >= 0x0600)
QuerySecurityAccessMask
( );
#endif // (_WIN32_WINNT >= 0x0600)
BOOL
RevertToSelf
( );
BOOL
SetAclInformation
( );
BOOL
SetFileSecurityW
( );
#ifdef UNICODE
#define SetFileSecurity SetFileSecurityW #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
SetKernelObjectSecurity
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
SetPrivateObjectSecurity
( );
BOOL
SetPrivateObjectSecurityEx
( );
#if (_WIN32_WINNT >= 0x0600)
SetSecurityAccessMask
( );
#endif // (_WIN32_WINNT >= 0x0600)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
SetSecurityDescriptorControl
( );
BOOL
SetSecurityDescriptorDacl
( );
BOOL
SetSecurityDescriptorGroup
( );
BOOL
SetSecurityDescriptorOwner
( );
DWORD
SetSecurityDescriptorRMControl
( );
BOOL
SetSecurityDescriptorSacl
( );
BOOL
SetTokenInformation
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
BOOL
SetCachedSigningLevel
( );
BOOL
GetCachedSigningLevel
( );
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
LONG
CveEventWrite
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
BOOL
DeriveCapabilitySidsFromName
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#ifdef __cplusplus
}
#endif
#endif // _APISECUREBASE_