1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 //! FFI bindings to psapi. 7 use shared::guiddef::GUID; 8 use shared::minwindef::{ 9 BOOL, BYTE, DWORD, LPBOOL, LPDWORD, LPVOID, PBOOL, PDWORD, PUCHAR, PULONG, UCHAR, ULONG 10 }; 11 use um::minwinbase::LPSECURITY_ATTRIBUTES; 12 use um::winnt::{ 13 ACL_INFORMATION_CLASS, AUDIT_EVENT_TYPE, BOOLEAN, HANDLE, LONG, LPCWSTR, LPWSTR, PACL, 14 PCLAIM_SECURITY_ATTRIBUTES_INFORMATION, PCWSTR, PGENERIC_MAPPING, PHANDLE, PLUID, 15 PLUID_AND_ATTRIBUTES, POBJECT_TYPE_LIST, PPRIVILEGE_SET, PSECURITY_DESCRIPTOR, 16 PSECURITY_DESCRIPTOR_CONTROL, PSID, PSID_AND_ATTRIBUTES, PSID_IDENTIFIER_AUTHORITY, 17 PTOKEN_GROUPS, PTOKEN_PRIVILEGES, PVOID, SECURITY_DESCRIPTOR_CONTROL, 18 SECURITY_IMPERSONATION_LEVEL, SECURITY_INFORMATION, TOKEN_INFORMATION_CLASS, TOKEN_TYPE, 19 WELL_KNOWN_SID_TYPE 20 }; 21 extern "system" { AccessCheck( pSecurityDescriptor: PSECURITY_DESCRIPTOR, ClientToken: HANDLE, DesiredAccess: DWORD, GenericMapping: PGENERIC_MAPPING, PrivilegeSet: PPRIVILEGE_SET, PrivilegeSetLength: LPDWORD, GrantedAccess: LPDWORD, AccessStatus: LPBOOL, ) -> BOOL22 pub fn AccessCheck( 23 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 24 ClientToken: HANDLE, 25 DesiredAccess: DWORD, 26 GenericMapping: PGENERIC_MAPPING, 27 PrivilegeSet: PPRIVILEGE_SET, 28 PrivilegeSetLength: LPDWORD, 29 GrantedAccess: LPDWORD, 30 AccessStatus: LPBOOL, 31 ) -> BOOL; AccessCheckAndAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, ObjectTypeName: LPWSTR, ObjectName: LPWSTR, SecurityDescriptor: PSECURITY_DESCRIPTOR, DesiredAccess: DWORD, GenericMapping: PGENERIC_MAPPING, ObjectCreation: BOOL, GrantedAccess: LPDWORD, AccessStatus: LPBOOL, pfGenerateOnClose: LPBOOL, ) -> BOOL32 pub fn AccessCheckAndAuditAlarmW( 33 SubsystemName: LPCWSTR, 34 HandleId: LPVOID, 35 ObjectTypeName: LPWSTR, 36 ObjectName: LPWSTR, 37 SecurityDescriptor: PSECURITY_DESCRIPTOR, 38 DesiredAccess: DWORD, 39 GenericMapping: PGENERIC_MAPPING, 40 ObjectCreation: BOOL, 41 GrantedAccess: LPDWORD, 42 AccessStatus: LPBOOL, 43 pfGenerateOnClose: LPBOOL, 44 ) -> BOOL; AccessCheckByType( pSecurityDescriptor: PSECURITY_DESCRIPTOR, PrincipalSelfSid: PSID, ClientToken: HANDLE, DesiredAccess: DWORD, ObjectTypeList: POBJECT_TYPE_LIST, ObjectTypeListLength: DWORD, GenericMapping: PGENERIC_MAPPING, PrivilegeSet: PPRIVILEGE_SET, PrivilegeSetLength: LPDWORD, GrantedAccess: LPDWORD, AccessStatus: LPBOOL, ) -> BOOL45 pub fn AccessCheckByType( 46 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 47 PrincipalSelfSid: PSID, 48 ClientToken: HANDLE, 49 DesiredAccess: DWORD, 50 ObjectTypeList: POBJECT_TYPE_LIST, 51 ObjectTypeListLength: DWORD, 52 GenericMapping: PGENERIC_MAPPING, 53 PrivilegeSet: PPRIVILEGE_SET, 54 PrivilegeSetLength: LPDWORD, 55 GrantedAccess: LPDWORD, 56 AccessStatus: LPBOOL, 57 ) -> BOOL; AccessCheckByTypeResultList( pSecurityDescriptor: PSECURITY_DESCRIPTOR, PrincipalSelfSid: PSID, ClientToken: HANDLE, DesiredAccess: DWORD, ObjectTypeList: POBJECT_TYPE_LIST, ObjectTypeListLength: DWORD, GenericMapping: PGENERIC_MAPPING, PrivilegeSet: PPRIVILEGE_SET, PrivilegeSetLength: LPDWORD, GrantedAccessList: LPDWORD, AccessStatusList: LPDWORD, ) -> BOOL58 pub fn AccessCheckByTypeResultList( 59 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 60 PrincipalSelfSid: PSID, 61 ClientToken: HANDLE, 62 DesiredAccess: DWORD, 63 ObjectTypeList: POBJECT_TYPE_LIST, 64 ObjectTypeListLength: DWORD, 65 GenericMapping: PGENERIC_MAPPING, 66 PrivilegeSet: PPRIVILEGE_SET, 67 PrivilegeSetLength: LPDWORD, 68 GrantedAccessList: LPDWORD, 69 AccessStatusList: LPDWORD, 70 ) -> BOOL; AccessCheckByTypeAndAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, ObjectTypeName: LPWSTR, ObjectName: LPCWSTR, pSecurityDescriptor: PSECURITY_DESCRIPTOR, PrincipalSelfSid: PSID, DesiredAccess: DWORD, AuditType: AUDIT_EVENT_TYPE, Flags: DWORD, ObjectTypeList: POBJECT_TYPE_LIST, ObjectTypeListLength: DWORD, GenericMapping: PGENERIC_MAPPING, ObjectCreation: BOOL, GrantedAccess: LPDWORD, AccessStatus: LPBOOL, pfGenerateOnClose: LPBOOL, ) -> BOOL71 pub fn AccessCheckByTypeAndAuditAlarmW( 72 SubsystemName: LPCWSTR, 73 HandleId: LPVOID, 74 ObjectTypeName: LPWSTR, 75 ObjectName: LPCWSTR, 76 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 77 PrincipalSelfSid: PSID, 78 DesiredAccess: DWORD, 79 AuditType: AUDIT_EVENT_TYPE, 80 Flags: DWORD, 81 ObjectTypeList: POBJECT_TYPE_LIST, 82 ObjectTypeListLength: DWORD, 83 GenericMapping: PGENERIC_MAPPING, 84 ObjectCreation: BOOL, 85 GrantedAccess: LPDWORD, 86 AccessStatus: LPBOOL, 87 pfGenerateOnClose: LPBOOL, 88 ) -> BOOL; AccessCheckByTypeResultListAndAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, ObjectTypeName: LPCWSTR, ObjectName: LPCWSTR, pSecurityDescriptor: PSECURITY_DESCRIPTOR, PrincipalSelfSid: PSID, DesiredAccess: DWORD, AuditType: AUDIT_EVENT_TYPE, Flags: DWORD, ObjectTypeList: POBJECT_TYPE_LIST, ObjectTypeListLength: DWORD, GenericMapping: PGENERIC_MAPPING, ObjectCreation: BOOL, GrantedAccess: LPDWORD, AccessStatusList: LPDWORD, pfGenerateOnClose: LPBOOL, ) -> BOOL89 pub fn AccessCheckByTypeResultListAndAuditAlarmW( 90 SubsystemName: LPCWSTR, 91 HandleId: LPVOID, 92 ObjectTypeName: LPCWSTR, 93 ObjectName: LPCWSTR, 94 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 95 PrincipalSelfSid: PSID, 96 DesiredAccess: DWORD, 97 AuditType: AUDIT_EVENT_TYPE, 98 Flags: DWORD, 99 ObjectTypeList: POBJECT_TYPE_LIST, 100 ObjectTypeListLength: DWORD, 101 GenericMapping: PGENERIC_MAPPING, 102 ObjectCreation: BOOL, 103 GrantedAccess: LPDWORD, 104 AccessStatusList: LPDWORD, 105 pfGenerateOnClose: LPBOOL, 106 ) -> BOOL; AccessCheckByTypeResultListAndAuditAlarmByHandleW( SubsystemName: LPCWSTR, HandleId: LPVOID, ClientToken: HANDLE, ObjectTypeName: LPCWSTR, ObjectName: LPCWSTR, pSecurityDescriptor: PSECURITY_DESCRIPTOR, PrincipalSelfSid: PSID, DesiredAccess: DWORD, AuditType: AUDIT_EVENT_TYPE, Flags: DWORD, ObjectTypeList: POBJECT_TYPE_LIST, ObjectTypeListLength: DWORD, GenericMapping: PGENERIC_MAPPING, ObjectCreation: BOOL, GrantedAccess: LPDWORD, AccessStatusList: LPDWORD, pfGenerateOnClose: LPBOOL, ) -> BOOL107 pub fn AccessCheckByTypeResultListAndAuditAlarmByHandleW( 108 SubsystemName: LPCWSTR, 109 HandleId: LPVOID, 110 ClientToken: HANDLE, 111 ObjectTypeName: LPCWSTR, 112 ObjectName: LPCWSTR, 113 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 114 PrincipalSelfSid: PSID, 115 DesiredAccess: DWORD, 116 AuditType: AUDIT_EVENT_TYPE, 117 Flags: DWORD, 118 ObjectTypeList: POBJECT_TYPE_LIST, 119 ObjectTypeListLength: DWORD, 120 GenericMapping: PGENERIC_MAPPING, 121 ObjectCreation: BOOL, 122 GrantedAccess: LPDWORD, 123 AccessStatusList: LPDWORD, 124 pfGenerateOnClose: LPBOOL, 125 ) -> BOOL; AddAccessAllowedAce( pAcl: PACL, dwAceRevision: DWORD, AccessMask: DWORD, pSid: PSID, ) -> BOOL126 pub fn AddAccessAllowedAce( 127 pAcl: PACL, 128 dwAceRevision: DWORD, 129 AccessMask: DWORD, 130 pSid: PSID, 131 ) -> BOOL; AddAccessAllowedAceEx( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, pSid: PSID, ) -> BOOL132 pub fn AddAccessAllowedAceEx( 133 pAcl: PACL, 134 dwAceRevision: DWORD, 135 AceFlags: DWORD, 136 AccessMask: DWORD, 137 pSid: PSID, 138 ) -> BOOL; AddAccessAllowedObjectAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, ObjectTypeGuid: *mut GUID, InheritedObjectTypeGuid: *mut GUID, pSid: PSID, ) -> BOOL139 pub fn AddAccessAllowedObjectAce( 140 pAcl: PACL, 141 dwAceRevision: DWORD, 142 AceFlags: DWORD, 143 AccessMask: DWORD, 144 ObjectTypeGuid: *mut GUID, 145 InheritedObjectTypeGuid: *mut GUID, 146 pSid: PSID, 147 ) -> BOOL; AddAccessDeniedAce( pAcl: PACL, dwAceRevision: DWORD, AccessMask: DWORD, pSid: PSID, ) -> BOOL148 pub fn AddAccessDeniedAce( 149 pAcl: PACL, 150 dwAceRevision: DWORD, 151 AccessMask: DWORD, 152 pSid: PSID, 153 ) -> BOOL; AddAccessDeniedAceEx( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, pSid: PSID, ) -> BOOL154 pub fn AddAccessDeniedAceEx( 155 pAcl: PACL, 156 dwAceRevision: DWORD, 157 AceFlags: DWORD, 158 AccessMask: DWORD, 159 pSid: PSID, 160 ) -> BOOL; AddAccessDeniedObjectAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, ObjectTypeGuid: *mut GUID, InheritedObjectTypeGuid: *mut GUID, pSid: PSID, ) -> BOOL161 pub fn AddAccessDeniedObjectAce( 162 pAcl: PACL, 163 dwAceRevision: DWORD, 164 AceFlags: DWORD, 165 AccessMask: DWORD, 166 ObjectTypeGuid: *mut GUID, 167 InheritedObjectTypeGuid: *mut GUID, 168 pSid: PSID, 169 ) -> BOOL; AddAce( pAcl: PACL, dwAceRevision: DWORD, dwStartingAceIndex: DWORD, pAceList: LPVOID, nAceListLength: DWORD, ) -> BOOL170 pub fn AddAce( 171 pAcl: PACL, 172 dwAceRevision: DWORD, 173 dwStartingAceIndex: DWORD, 174 pAceList: LPVOID, 175 nAceListLength: DWORD, 176 ) -> BOOL; AddAuditAccessAce( pAcl: PACL, dwAceRevision: DWORD, dwAccessMask: DWORD, pSid: PSID, bAuditSuccess: BOOL, bAuditFailure: BOOL, ) -> BOOL177 pub fn AddAuditAccessAce( 178 pAcl: PACL, 179 dwAceRevision: DWORD, 180 dwAccessMask: DWORD, 181 pSid: PSID, 182 bAuditSuccess: BOOL, 183 bAuditFailure: BOOL, 184 ) -> BOOL; AddAuditAccessAceEx( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, dwAccessMask: DWORD, pSid: PSID, bAuditSuccess: BOOL, bAuditFailure: BOOL, ) -> BOOL185 pub fn AddAuditAccessAceEx( 186 pAcl: PACL, 187 dwAceRevision: DWORD, 188 AceFlags: DWORD, 189 dwAccessMask: DWORD, 190 pSid: PSID, 191 bAuditSuccess: BOOL, 192 bAuditFailure: BOOL, 193 ) -> BOOL; AddAuditAccessObjectAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, ObjectTypeGuid: *mut GUID, InheritedObjectTypeGuid: *mut GUID, pSid: PSID, bAuditSuccess: BOOL, bAuditFailure: BOOL, ) -> BOOL194 pub fn AddAuditAccessObjectAce( 195 pAcl: PACL, 196 dwAceRevision: DWORD, 197 AceFlags: DWORD, 198 AccessMask: DWORD, 199 ObjectTypeGuid: *mut GUID, 200 InheritedObjectTypeGuid: *mut GUID, 201 pSid: PSID, 202 bAuditSuccess: BOOL, 203 bAuditFailure: BOOL, 204 ) -> BOOL; AddMandatoryAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, MandatoryPolicy: DWORD, pLabelSid: PSID, ) -> BOOL205 pub fn AddMandatoryAce( 206 pAcl: PACL, 207 dwAceRevision: DWORD, 208 AceFlags: DWORD, 209 MandatoryPolicy: DWORD, 210 pLabelSid: PSID, 211 ) -> BOOL; AddResourceAttributeAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, pSid: PSID, pAttributeInfo: PCLAIM_SECURITY_ATTRIBUTES_INFORMATION, pReturnLength: PDWORD, ) -> BOOL212 pub fn AddResourceAttributeAce( 213 pAcl: PACL, 214 dwAceRevision: DWORD, 215 AceFlags: DWORD, 216 AccessMask: DWORD, 217 pSid: PSID, 218 pAttributeInfo: PCLAIM_SECURITY_ATTRIBUTES_INFORMATION, 219 pReturnLength: PDWORD, 220 ) -> BOOL; AddScopedPolicyIDAce( pAcl: PACL, dwAceRevision: DWORD, AceFlags: DWORD, AccessMask: DWORD, pSid: PSID, ) -> BOOL221 pub fn AddScopedPolicyIDAce( 222 pAcl: PACL, 223 dwAceRevision: DWORD, 224 AceFlags: DWORD, 225 AccessMask: DWORD, 226 pSid: PSID, 227 ) -> BOOL; AdjustTokenGroups( TokenHandle: HANDLE, ResetToDefault: BOOL, NewState: PTOKEN_GROUPS, BufferLength: DWORD, PreviousState: PTOKEN_GROUPS, ReturnLength: PDWORD, ) -> BOOL228 pub fn AdjustTokenGroups( 229 TokenHandle: HANDLE, 230 ResetToDefault: BOOL, 231 NewState: PTOKEN_GROUPS, 232 BufferLength: DWORD, 233 PreviousState: PTOKEN_GROUPS, 234 ReturnLength: PDWORD, 235 ) -> BOOL; AdjustTokenPrivileges( TokenHandle: HANDLE, DisableAllPrivileges: BOOL, NewState: PTOKEN_PRIVILEGES, BufferLength: DWORD, PreviousState: PTOKEN_PRIVILEGES, ReturnLength: PDWORD, ) -> BOOL236 pub fn AdjustTokenPrivileges( 237 TokenHandle: HANDLE, 238 DisableAllPrivileges: BOOL, 239 NewState: PTOKEN_PRIVILEGES, 240 BufferLength: DWORD, 241 PreviousState: PTOKEN_PRIVILEGES, 242 ReturnLength: PDWORD, 243 ) -> BOOL; AllocateAndInitializeSid( pIdentifierAuthoirity: PSID_IDENTIFIER_AUTHORITY, nSubAuthorityCount: BYTE, dwSubAuthority0: DWORD, dwSubAuthority1: DWORD, dwSubAuthority2: DWORD, dwSubAuthority3: DWORD, dwSubAuthority4: DWORD, dwSubAuthority5: DWORD, dwSubAuthority6: DWORD, dwSubAuthority7: DWORD, pSid: *mut PSID, ) -> BOOL244 pub fn AllocateAndInitializeSid( 245 pIdentifierAuthoirity: PSID_IDENTIFIER_AUTHORITY, 246 nSubAuthorityCount: BYTE, 247 dwSubAuthority0: DWORD, 248 dwSubAuthority1: DWORD, 249 dwSubAuthority2: DWORD, 250 dwSubAuthority3: DWORD, 251 dwSubAuthority4: DWORD, 252 dwSubAuthority5: DWORD, 253 dwSubAuthority6: DWORD, 254 dwSubAuthority7: DWORD, 255 pSid: *mut PSID, 256 ) -> BOOL; AllocateLocallyUniqueId( Luid: PLUID, ) -> BOOL257 pub fn AllocateLocallyUniqueId( 258 Luid: PLUID, 259 ) -> BOOL; AreAllAccessesGranted( GrantedAccess: DWORD, DesiredAccess: DWORD, ) -> BOOL260 pub fn AreAllAccessesGranted( 261 GrantedAccess: DWORD, 262 DesiredAccess: DWORD, 263 ) -> BOOL; AreAnyAccessesGranted( GrantedAccess: DWORD, DesiredAccess: DWORD, ) -> BOOL264 pub fn AreAnyAccessesGranted( 265 GrantedAccess: DWORD, 266 DesiredAccess: DWORD, 267 ) -> BOOL; CheckTokenMembership( TokenHandle: HANDLE, SidToCheck: PSID, IsMember: PBOOL, ) -> BOOL268 pub fn CheckTokenMembership( 269 TokenHandle: HANDLE, 270 SidToCheck: PSID, 271 IsMember: PBOOL, 272 ) -> BOOL; CheckTokenCapability( TokenHandle: HANDLE, CapabilitySidToCheck: PSID, HasCapability: PBOOL, ) -> BOOL273 pub fn CheckTokenCapability( 274 TokenHandle: HANDLE, 275 CapabilitySidToCheck: PSID, 276 HasCapability: PBOOL, 277 ) -> BOOL; GetAppContainerAce( Acl: PACL, StartingAceIndex: DWORD, AppContainerAce: *mut PVOID, AppContainerAceIndex: *mut DWORD, ) -> BOOL278 pub fn GetAppContainerAce( 279 Acl: PACL, 280 StartingAceIndex: DWORD, 281 AppContainerAce: *mut PVOID, 282 AppContainerAceIndex: *mut DWORD, 283 ) -> BOOL; CheckTokenMembershipEx( TokenHandle: HANDLE, SidToCheck: PSID, Flags: DWORD, IsMember: PBOOL, ) -> BOOL284 pub fn CheckTokenMembershipEx( 285 TokenHandle: HANDLE, 286 SidToCheck: PSID, 287 Flags: DWORD, 288 IsMember: PBOOL, 289 ) -> BOOL; ConvertToAutoInheritPrivateObjectSecurity( ParentDescriptor: PSECURITY_DESCRIPTOR, CurrentSecurityDescriptor: PSECURITY_DESCRIPTOR, NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, ObjectType: *mut GUID, IsDirectoryObject: BOOLEAN, GenericMapping: PGENERIC_MAPPING, ) -> BOOL290 pub fn ConvertToAutoInheritPrivateObjectSecurity( 291 ParentDescriptor: PSECURITY_DESCRIPTOR, 292 CurrentSecurityDescriptor: PSECURITY_DESCRIPTOR, 293 NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 294 ObjectType: *mut GUID, 295 IsDirectoryObject: BOOLEAN, 296 GenericMapping: PGENERIC_MAPPING, 297 ) -> BOOL; CopySid( nDestinationSidLength: DWORD, pDestinationSid: PSID, pSourceSid: PSID, ) -> BOOL298 pub fn CopySid( 299 nDestinationSidLength: DWORD, 300 pDestinationSid: PSID, 301 pSourceSid: PSID, 302 ) -> BOOL; CreatePrivateObjectSecurity( ParentDescriptor: PSECURITY_DESCRIPTOR, CreatorDescriptor: PSECURITY_DESCRIPTOR, NewDescriptor: *mut PSECURITY_DESCRIPTOR, IsDirectoryObject: BOOL, Token: HANDLE, GenericMapping: PGENERIC_MAPPING, ) -> BOOL303 pub fn CreatePrivateObjectSecurity( 304 ParentDescriptor: PSECURITY_DESCRIPTOR, 305 CreatorDescriptor: PSECURITY_DESCRIPTOR, 306 NewDescriptor: *mut PSECURITY_DESCRIPTOR, 307 IsDirectoryObject: BOOL, 308 Token: HANDLE, 309 GenericMapping: PGENERIC_MAPPING, 310 ) -> BOOL; CreatePrivateObjectSecurityEx( ParentDescriptor: PSECURITY_DESCRIPTOR, CreatorDescriptor: PSECURITY_DESCRIPTOR, NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, ObjectType: *mut GUID, IsContainerObject: BOOL, AutoInheritFlags: ULONG, Token: HANDLE, GenericMapping: PGENERIC_MAPPING, ) -> BOOL311 pub fn CreatePrivateObjectSecurityEx( 312 ParentDescriptor: PSECURITY_DESCRIPTOR, 313 CreatorDescriptor: PSECURITY_DESCRIPTOR, 314 NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 315 ObjectType: *mut GUID, 316 IsContainerObject: BOOL, 317 AutoInheritFlags: ULONG, 318 Token: HANDLE, 319 GenericMapping: PGENERIC_MAPPING, 320 ) -> BOOL; CreatePrivateObjectSecurityWithMultipleInheritance( ParentDescriptor: PSECURITY_DESCRIPTOR, CreatorDescriptor: PSECURITY_DESCRIPTOR, NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, ObjectTypes: *mut *mut GUID, GuidCount: ULONG, IsContainerObject: BOOL, AutoInheritFlags: ULONG, Token: HANDLE, GenericMapping: PGENERIC_MAPPING, ) -> BOOL321 pub fn CreatePrivateObjectSecurityWithMultipleInheritance( 322 ParentDescriptor: PSECURITY_DESCRIPTOR, 323 CreatorDescriptor: PSECURITY_DESCRIPTOR, 324 NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 325 ObjectTypes: *mut *mut GUID, 326 GuidCount: ULONG, 327 IsContainerObject: BOOL, 328 AutoInheritFlags: ULONG, 329 Token: HANDLE, 330 GenericMapping: PGENERIC_MAPPING, 331 ) -> BOOL; CreateRestrictedToken( ExistingTokenHandle: HANDLE, Flags: DWORD, DisableSidCount: DWORD, SidsToDisable: PSID_AND_ATTRIBUTES, DeletePrivilegeCount: DWORD, PrivilegesToDelete: PLUID_AND_ATTRIBUTES, RestrictedSidCount: DWORD, SidsToRestrict: PSID_AND_ATTRIBUTES, NewTokenHandle: PHANDLE, ) -> BOOL332 pub fn CreateRestrictedToken( 333 ExistingTokenHandle: HANDLE, 334 Flags: DWORD, 335 DisableSidCount: DWORD, 336 SidsToDisable: PSID_AND_ATTRIBUTES, 337 DeletePrivilegeCount: DWORD, 338 PrivilegesToDelete: PLUID_AND_ATTRIBUTES, 339 RestrictedSidCount: DWORD, 340 SidsToRestrict: PSID_AND_ATTRIBUTES, 341 NewTokenHandle: PHANDLE, 342 ) -> BOOL; CreateWellKnownSid( WellKnownSidType: WELL_KNOWN_SID_TYPE, DomainSid: PSID, pSid: PSID, cbSid: *mut DWORD, ) -> BOOL343 pub fn CreateWellKnownSid( 344 WellKnownSidType: WELL_KNOWN_SID_TYPE, 345 DomainSid: PSID, 346 pSid: PSID, 347 cbSid: *mut DWORD, 348 ) -> BOOL; EqualDomainSid( pSid1: PSID, pSid2: PSID, pfEqual: *mut BOOL, ) -> BOOL349 pub fn EqualDomainSid( 350 pSid1: PSID, 351 pSid2: PSID, 352 pfEqual: *mut BOOL, 353 ) -> BOOL; DeleteAce( pAcl: PACL, dwAceIndex: DWORD, ) -> BOOL354 pub fn DeleteAce( 355 pAcl: PACL, 356 dwAceIndex: DWORD, 357 ) -> BOOL; DestroyPrivateObjectSecurity( ObjectDescriptor: *mut PSECURITY_DESCRIPTOR, ) -> BOOL358 pub fn DestroyPrivateObjectSecurity( 359 ObjectDescriptor: *mut PSECURITY_DESCRIPTOR, 360 ) -> BOOL; DuplicateToken( ExistingTokenHandle: HANDLE, ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, DuplicateTokenHandle: PHANDLE, ) -> BOOL361 pub fn DuplicateToken( 362 ExistingTokenHandle: HANDLE, 363 ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, 364 DuplicateTokenHandle: PHANDLE, 365 ) -> BOOL; DuplicateTokenEx( hExistingToken: HANDLE, dwDesiredAccess: DWORD, lpTokenAttributes: LPSECURITY_ATTRIBUTES, ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, TokenType: TOKEN_TYPE, phNewToken: PHANDLE, ) -> BOOL366 pub fn DuplicateTokenEx( 367 hExistingToken: HANDLE, 368 dwDesiredAccess: DWORD, 369 lpTokenAttributes: LPSECURITY_ATTRIBUTES, 370 ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, 371 TokenType: TOKEN_TYPE, 372 phNewToken: PHANDLE, 373 ) -> BOOL; EqualPrefixSid( pSid1: PSID, pSid2: PSID, ) -> BOOL374 pub fn EqualPrefixSid( 375 pSid1: PSID, 376 pSid2: PSID, 377 ) -> BOOL; EqualSid( pSid1: PSID, pSid2: PSID, ) -> BOOL378 pub fn EqualSid( 379 pSid1: PSID, 380 pSid2: PSID, 381 ) -> BOOL; FindFirstFreeAce( pAcl: PACL, pAce: *mut LPVOID, ) -> BOOL382 pub fn FindFirstFreeAce( 383 pAcl: PACL, 384 pAce: *mut LPVOID, 385 ) -> BOOL; FreeSid( pSid: PSID, ) -> PVOID386 pub fn FreeSid( 387 pSid: PSID, 388 ) -> PVOID; GetAce( pAcl: PACL, dwAceIndex: DWORD, pAce: *mut LPVOID, ) -> BOOL389 pub fn GetAce( 390 pAcl: PACL, 391 dwAceIndex: DWORD, 392 pAce: *mut LPVOID, 393 ) -> BOOL; GetAclInformation( pAcl: PACL, pAclInformtion: LPVOID, nAclInformationLength: DWORD, dwAclInformationClass: ACL_INFORMATION_CLASS, ) -> BOOL394 pub fn GetAclInformation( 395 pAcl: PACL, 396 pAclInformtion: LPVOID, 397 nAclInformationLength: DWORD, 398 dwAclInformationClass: ACL_INFORMATION_CLASS, 399 ) -> BOOL; GetFileSecurityW( lpFileName: LPCWSTR, RequestedInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, nLength: DWORD, lpnLengthNeeded: LPDWORD, ) -> BOOL400 pub fn GetFileSecurityW( 401 lpFileName: LPCWSTR, 402 RequestedInformation: SECURITY_INFORMATION, 403 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 404 nLength: DWORD, 405 lpnLengthNeeded: LPDWORD, 406 ) -> BOOL; GetKernelObjectSecurity( Handle: HANDLE, RequestedInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, nLength: DWORD, lpnLengthNeeded: LPDWORD, ) -> BOOL407 pub fn GetKernelObjectSecurity( 408 Handle: HANDLE, 409 RequestedInformation: SECURITY_INFORMATION, 410 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 411 nLength: DWORD, 412 lpnLengthNeeded: LPDWORD, 413 ) -> BOOL; GetLengthSid( pSid: PSID, ) -> DWORD414 pub fn GetLengthSid( 415 pSid: PSID, 416 ) -> DWORD; GetPrivateObjectSecurity( ObjectDescriptor: PSECURITY_DESCRIPTOR, SecurityInformation: SECURITY_INFORMATION, ResultantDescriptor: PSECURITY_DESCRIPTOR, DescriptorLength: DWORD, ReturnLength: PDWORD, ) -> BOOL417 pub fn GetPrivateObjectSecurity( 418 ObjectDescriptor: PSECURITY_DESCRIPTOR, 419 SecurityInformation: SECURITY_INFORMATION, 420 ResultantDescriptor: PSECURITY_DESCRIPTOR, 421 DescriptorLength: DWORD, 422 ReturnLength: PDWORD, 423 ) -> BOOL; GetSecurityDescriptorControl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, pControl: PSECURITY_DESCRIPTOR_CONTROL, lpdwRevision: LPDWORD, ) -> BOOL424 pub fn GetSecurityDescriptorControl( 425 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 426 pControl: PSECURITY_DESCRIPTOR_CONTROL, 427 lpdwRevision: LPDWORD, 428 ) -> BOOL; GetSecurityDescriptorDacl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, lpbDaclPresent: LPBOOL, pDacl: *mut PACL, lpbDaclDefaulted: LPBOOL, ) -> BOOL429 pub fn GetSecurityDescriptorDacl( 430 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 431 lpbDaclPresent: LPBOOL, 432 pDacl: *mut PACL, 433 lpbDaclDefaulted: LPBOOL, 434 ) -> BOOL; GetSecurityDescriptorGroup( pSecurityDescriptor: PSECURITY_DESCRIPTOR, pGroup: *mut PSID, lpbGroupDefaulted: LPBOOL, ) -> BOOL435 pub fn GetSecurityDescriptorGroup( 436 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 437 pGroup: *mut PSID, 438 lpbGroupDefaulted: LPBOOL, 439 ) -> BOOL; GetSecurityDescriptorLength( pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> DWORD440 pub fn GetSecurityDescriptorLength( 441 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 442 ) -> DWORD; GetSecurityDescriptorOwner( pSecurityDescriptor: PSECURITY_DESCRIPTOR, pOwner: *mut PSID, lpbOwnerDefaulted: LPBOOL, ) -> BOOL443 pub fn GetSecurityDescriptorOwner( 444 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 445 pOwner: *mut PSID, 446 lpbOwnerDefaulted: LPBOOL, 447 ) -> BOOL; GetSecurityDescriptorRMControl( SecurityDescriptor: PSECURITY_DESCRIPTOR, RMControl: PUCHAR, ) -> DWORD448 pub fn GetSecurityDescriptorRMControl( 449 SecurityDescriptor: PSECURITY_DESCRIPTOR, 450 RMControl: PUCHAR, 451 ) -> DWORD; GetSecurityDescriptorSacl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, lpbSaclPresent: LPBOOL, pSacl: *mut PACL, lpbSaclDefaulted: LPBOOL, ) -> BOOL452 pub fn GetSecurityDescriptorSacl( 453 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 454 lpbSaclPresent: LPBOOL, 455 pSacl: *mut PACL, 456 lpbSaclDefaulted: LPBOOL, 457 ) -> BOOL; GetSidIdentifierAuthority( pSid: PSID, ) -> PSID_IDENTIFIER_AUTHORITY458 pub fn GetSidIdentifierAuthority( 459 pSid: PSID, 460 ) -> PSID_IDENTIFIER_AUTHORITY; GetSidLengthRequired( nSubAuthorityCount: UCHAR, ) -> DWORD461 pub fn GetSidLengthRequired( 462 nSubAuthorityCount: UCHAR, 463 ) -> DWORD; GetSidSubAuthority( pSid: PSID, nSubAuthority: DWORD, ) -> PDWORD464 pub fn GetSidSubAuthority( 465 pSid: PSID, 466 nSubAuthority: DWORD, 467 ) -> PDWORD; GetSidSubAuthorityCount( pSid: PSID, ) -> PUCHAR468 pub fn GetSidSubAuthorityCount( 469 pSid: PSID, 470 ) -> PUCHAR; GetTokenInformation( TokenHandle: HANDLE, TokenInformationClass: TOKEN_INFORMATION_CLASS, TokenInformation: LPVOID, TokenInformationLength: DWORD, ReturnLength: PDWORD, ) -> BOOL471 pub fn GetTokenInformation( 472 TokenHandle: HANDLE, 473 TokenInformationClass: TOKEN_INFORMATION_CLASS, 474 TokenInformation: LPVOID, 475 TokenInformationLength: DWORD, 476 ReturnLength: PDWORD, 477 ) -> BOOL; GetWindowsAccountDomainSid( pSid: PSID, pDomainSid: PSID, cbDomainSid: *mut DWORD, ) -> BOOL478 pub fn GetWindowsAccountDomainSid( 479 pSid: PSID, 480 pDomainSid: PSID, 481 cbDomainSid: *mut DWORD, 482 ) -> BOOL; ImpersonateAnonymousToken( ThreadHandle: HANDLE, ) -> BOOL483 pub fn ImpersonateAnonymousToken( 484 ThreadHandle: HANDLE, 485 ) -> BOOL; ImpersonateLoggedOnUser( hToken: HANDLE, ) -> BOOL486 pub fn ImpersonateLoggedOnUser( 487 hToken: HANDLE, 488 ) -> BOOL; ImpersonateSelf( ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, ) -> BOOL489 pub fn ImpersonateSelf( 490 ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, 491 ) -> BOOL; InitializeAcl( pAcl: PACL, nAclLength: DWORD, dwAclRevision: DWORD, ) -> BOOL492 pub fn InitializeAcl( 493 pAcl: PACL, 494 nAclLength: DWORD, 495 dwAclRevision: DWORD, 496 ) -> BOOL; InitializeSecurityDescriptor( pSecurityDescriptor: PSECURITY_DESCRIPTOR, dwRevision: DWORD, ) -> BOOL497 pub fn InitializeSecurityDescriptor( 498 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 499 dwRevision: DWORD, 500 ) -> BOOL; InitializeSid( Sid: PSID, pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, nSubAuthorityCount: BYTE, ) -> BOOL501 pub fn InitializeSid( 502 Sid: PSID, 503 pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, 504 nSubAuthorityCount: BYTE, 505 ) -> BOOL; IsTokenRestricted( TokenHandle: HANDLE, ) -> BOOL506 pub fn IsTokenRestricted( 507 TokenHandle: HANDLE, 508 ) -> BOOL; IsValidAcl( pAcl: PACL, ) -> BOOL509 pub fn IsValidAcl( 510 pAcl: PACL, 511 ) -> BOOL; IsValidSecurityDescriptor( pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> BOOL512 pub fn IsValidSecurityDescriptor( 513 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 514 ) -> BOOL; IsValidSid( pSid: PSID, ) -> BOOL515 pub fn IsValidSid( 516 pSid: PSID, 517 ) -> BOOL; IsWellKnownSid( pSid: PSID, WellKnownSidType: WELL_KNOWN_SID_TYPE, ) -> BOOL518 pub fn IsWellKnownSid( 519 pSid: PSID, 520 WellKnownSidType: WELL_KNOWN_SID_TYPE, 521 ) -> BOOL; MakeAbsoluteSD( pSelfRelativeSD: PSECURITY_DESCRIPTOR, pAbsoluteSD: PSECURITY_DESCRIPTOR, lpdwAbsoluteSDSize: LPDWORD, pDacl: PACL, lpdwDaclSize: LPDWORD, pSacl: PACL, lpdwSaclSize: LPDWORD, pOwner: PSID, lpdwOwnerSize: LPDWORD, pPrimaryGroup: PSID, lpdwPrimaryGroupSize: LPDWORD, ) -> BOOL522 pub fn MakeAbsoluteSD( 523 pSelfRelativeSD: PSECURITY_DESCRIPTOR, 524 pAbsoluteSD: PSECURITY_DESCRIPTOR, 525 lpdwAbsoluteSDSize: LPDWORD, 526 pDacl: PACL, 527 lpdwDaclSize: LPDWORD, 528 pSacl: PACL, 529 lpdwSaclSize: LPDWORD, 530 pOwner: PSID, 531 lpdwOwnerSize: LPDWORD, 532 pPrimaryGroup: PSID, 533 lpdwPrimaryGroupSize: LPDWORD, 534 ) -> BOOL; MakeSelfRelativeSD( pAbsoluteSD: PSECURITY_DESCRIPTOR, pSelfRelativeSD: PSECURITY_DESCRIPTOR, lpdwBufferLength: LPDWORD, ) -> BOOL535 pub fn MakeSelfRelativeSD( 536 pAbsoluteSD: PSECURITY_DESCRIPTOR, 537 pSelfRelativeSD: PSECURITY_DESCRIPTOR, 538 lpdwBufferLength: LPDWORD, 539 ) -> BOOL; MapGenericMask( AccessMask: PDWORD, GenericMapping: PGENERIC_MAPPING, )540 pub fn MapGenericMask( 541 AccessMask: PDWORD, 542 GenericMapping: PGENERIC_MAPPING, 543 ); ObjectCloseAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, GenerateOnClose: BOOL, ) -> BOOL544 pub fn ObjectCloseAuditAlarmW( 545 SubsystemName: LPCWSTR, 546 HandleId: LPVOID, 547 GenerateOnClose: BOOL, 548 ) -> BOOL; ObjectDeleteAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, GenerateOnClose: BOOL, ) -> BOOL549 pub fn ObjectDeleteAuditAlarmW( 550 SubsystemName: LPCWSTR, 551 HandleId: LPVOID, 552 GenerateOnClose: BOOL, 553 ) -> BOOL; ObjectOpenAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, ObjectTypeName: LPWSTR, ObjectName: LPWSTR, pSecurityDescriptor: PSECURITY_DESCRIPTOR, ClientToken: HANDLE, DesiredAccess: DWORD, GrantedAccess: DWORD, Privileges: PPRIVILEGE_SET, ObjectCreation: BOOL, AccessGranted: BOOL, GenerateOnClose: LPBOOL, ) -> BOOL554 pub fn ObjectOpenAuditAlarmW( 555 SubsystemName: LPCWSTR, 556 HandleId: LPVOID, 557 ObjectTypeName: LPWSTR, 558 ObjectName: LPWSTR, 559 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 560 ClientToken: HANDLE, 561 DesiredAccess: DWORD, 562 GrantedAccess: DWORD, 563 Privileges: PPRIVILEGE_SET, 564 ObjectCreation: BOOL, 565 AccessGranted: BOOL, 566 GenerateOnClose: LPBOOL, 567 ) -> BOOL; ObjectPrivilegeAuditAlarmW( SubsystemName: LPCWSTR, HandleId: LPVOID, ClientToken: HANDLE, DesiredAccess: DWORD, Privileges: PPRIVILEGE_SET, AccessGranted: BOOL, ) -> BOOL568 pub fn ObjectPrivilegeAuditAlarmW( 569 SubsystemName: LPCWSTR, 570 HandleId: LPVOID, 571 ClientToken: HANDLE, 572 DesiredAccess: DWORD, 573 Privileges: PPRIVILEGE_SET, 574 AccessGranted: BOOL, 575 ) -> BOOL; PrivilegeCheck( ClientToken: HANDLE, RequiredPrivileges: PPRIVILEGE_SET, pfResult: LPBOOL, ) -> BOOL576 pub fn PrivilegeCheck( 577 ClientToken: HANDLE, 578 RequiredPrivileges: PPRIVILEGE_SET, 579 pfResult: LPBOOL, 580 ) -> BOOL; PrivilegedServiceAuditAlarmW( SubsystemName: LPCWSTR, ServiceName: LPCWSTR, ClientToken: HANDLE, Privileges: PPRIVILEGE_SET, AccessGranted: BOOL, ) -> BOOL581 pub fn PrivilegedServiceAuditAlarmW( 582 SubsystemName: LPCWSTR, 583 ServiceName: LPCWSTR, 584 ClientToken: HANDLE, 585 Privileges: PPRIVILEGE_SET, 586 AccessGranted: BOOL, 587 ) -> BOOL; QuerySecurityAccessMask( SecurityInformation: SECURITY_INFORMATION, DesiredAccess: LPDWORD, )588 pub fn QuerySecurityAccessMask( 589 SecurityInformation: SECURITY_INFORMATION, 590 DesiredAccess: LPDWORD, 591 ); RevertToSelf() -> BOOL592 pub fn RevertToSelf() -> BOOL; SetAclInformation( pAcl: PACL, pAclInformation: LPVOID, nAclInformationLength: DWORD, dwAclInfomrationClass: ACL_INFORMATION_CLASS, ) -> BOOL593 pub fn SetAclInformation( 594 pAcl: PACL, 595 pAclInformation: LPVOID, 596 nAclInformationLength: DWORD, 597 dwAclInfomrationClass: ACL_INFORMATION_CLASS, 598 ) -> BOOL; SetFileSecurityW( lpFileName: LPCWSTR, SecurityInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> BOOL599 pub fn SetFileSecurityW( 600 lpFileName: LPCWSTR, 601 SecurityInformation: SECURITY_INFORMATION, 602 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 603 ) -> BOOL; SetKernelObjectSecurity( Handle: HANDLE, SecurityInformation: SECURITY_INFORMATION, SecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> BOOL604 pub fn SetKernelObjectSecurity( 605 Handle: HANDLE, 606 SecurityInformation: SECURITY_INFORMATION, 607 SecurityDescriptor: PSECURITY_DESCRIPTOR, 608 ) -> BOOL; SetPrivateObjectSecurity( SecurityInformation: SECURITY_INFORMATION, ModificationDescriptor: PSECURITY_DESCRIPTOR, ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, GenericMapping: PGENERIC_MAPPING, Token: HANDLE, ) -> BOOL609 pub fn SetPrivateObjectSecurity( 610 SecurityInformation: SECURITY_INFORMATION, 611 ModificationDescriptor: PSECURITY_DESCRIPTOR, 612 ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 613 GenericMapping: PGENERIC_MAPPING, 614 Token: HANDLE, 615 ) -> BOOL; SetPrivateObjectSecurityEx( SecurityInformation: SECURITY_INFORMATION, ModificationDescriptor: PSECURITY_DESCRIPTOR, ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, AutoInheritFlags: ULONG, GenericMapping: PGENERIC_MAPPING, Token: HANDLE, ) -> BOOL616 pub fn SetPrivateObjectSecurityEx( 617 SecurityInformation: SECURITY_INFORMATION, 618 ModificationDescriptor: PSECURITY_DESCRIPTOR, 619 ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 620 AutoInheritFlags: ULONG, 621 GenericMapping: PGENERIC_MAPPING, 622 Token: HANDLE, 623 ) -> BOOL; SetSecurityAccessMask( SecurityInformation: SECURITY_INFORMATION, DesiredAccess: LPDWORD, )624 pub fn SetSecurityAccessMask( 625 SecurityInformation: SECURITY_INFORMATION, 626 DesiredAccess: LPDWORD, 627 ); SetSecurityDescriptorControl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, ControlBitsOfInterest: SECURITY_DESCRIPTOR_CONTROL, ControlBitsToSet: SECURITY_DESCRIPTOR_CONTROL, ) -> BOOL628 pub fn SetSecurityDescriptorControl( 629 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 630 ControlBitsOfInterest: SECURITY_DESCRIPTOR_CONTROL, 631 ControlBitsToSet: SECURITY_DESCRIPTOR_CONTROL, 632 ) -> BOOL; SetSecurityDescriptorDacl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, bDaclPresent: BOOL, pDacl: PACL, bDaclDefaulted: BOOL, ) -> BOOL633 pub fn SetSecurityDescriptorDacl( 634 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 635 bDaclPresent: BOOL, 636 pDacl: PACL, 637 bDaclDefaulted: BOOL, 638 ) -> BOOL; SetSecurityDescriptorGroup( pSecurityDescriptor: PSECURITY_DESCRIPTOR, pGroup: PSID, bGroupDefaulted: BOOL, ) -> BOOL639 pub fn SetSecurityDescriptorGroup( 640 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 641 pGroup: PSID, 642 bGroupDefaulted: BOOL, 643 ) -> BOOL; SetSecurityDescriptorOwner( pSecurityDescriptor: PSECURITY_DESCRIPTOR, pOwner: PSID, bOwnerDefaulted: BOOL, ) -> BOOL644 pub fn SetSecurityDescriptorOwner( 645 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 646 pOwner: PSID, 647 bOwnerDefaulted: BOOL, 648 ) -> BOOL; SetSecurityDescriptorRMControl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, RMControl: PUCHAR, ) -> DWORD649 pub fn SetSecurityDescriptorRMControl( 650 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 651 RMControl: PUCHAR, 652 ) -> DWORD; SetSecurityDescriptorSacl( pSecurityDescriptor: PSECURITY_DESCRIPTOR, bSaclPresent: BOOL, pSacl: PACL, bSaclDefaulted: BOOL, ) -> BOOL653 pub fn SetSecurityDescriptorSacl( 654 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 655 bSaclPresent: BOOL, 656 pSacl: PACL, 657 bSaclDefaulted: BOOL, 658 ) -> BOOL; SetTokenInformation( TokenHandle: HANDLE, TokenInformationClass: TOKEN_INFORMATION_CLASS, TokenInformation: LPVOID, TokenInformationLength: DWORD, ) -> BOOL659 pub fn SetTokenInformation( 660 TokenHandle: HANDLE, 661 TokenInformationClass: TOKEN_INFORMATION_CLASS, 662 TokenInformation: LPVOID, 663 TokenInformationLength: DWORD, 664 ) -> BOOL; SetCachedSigningLevel( SourceFiles: PHANDLE, SourceFileCount: ULONG, Flags: ULONG, TargetFile: HANDLE, ) -> BOOL665 pub fn SetCachedSigningLevel( 666 SourceFiles: PHANDLE, 667 SourceFileCount: ULONG, 668 Flags: ULONG, 669 TargetFile: HANDLE, 670 ) -> BOOL; GetCachedSigningLevel( File: HANDLE, Flags: PULONG, SigningLevel: PULONG, Thumbprint: PUCHAR, ThumbprintSize: PULONG, ThumbprintAlgorithm: PULONG, ) -> BOOL671 pub fn GetCachedSigningLevel( 672 File: HANDLE, 673 Flags: PULONG, 674 SigningLevel: PULONG, 675 Thumbprint: PUCHAR, 676 ThumbprintSize: PULONG, 677 ThumbprintAlgorithm: PULONG, 678 ) -> BOOL; CveEventWrite( CveId: PCWSTR, AdditionalDetails: PCWSTR, ) -> LONG679 pub fn CveEventWrite( 680 CveId: PCWSTR, 681 AdditionalDetails: PCWSTR, 682 ) -> LONG; DeriveCapabilitySidsFromName( CapName: LPCWSTR, CapabilityGroupSids: *mut *mut PSID, CapabilityGroupSidCount: *mut DWORD, CapabilitySids: *mut *mut PSID, CapabilitySidCount: *mut DWORD, ) -> BOOL683 pub fn DeriveCapabilitySidsFromName( 684 CapName: LPCWSTR, 685 CapabilityGroupSids: *mut *mut PSID, 686 CapabilityGroupSidCount: *mut DWORD, 687 CapabilitySids: *mut *mut PSID, 688 CapabilitySidCount: *mut DWORD, 689 ) -> BOOL; 690 } 691