InitializeAcl

  BOOL InitializeAcl(Acl, AclLength, AclRevision)    
  PACL Acl;    
  DWORD AclLength;    
  DWORD AclRevision;    

The InitializeAcl function creates a new ACL data structure. An ACL is an access control list. The function creates the new ACL in a caller-supplied memory buffer.

The new ACL contains no access control entries (ACEs). Thus, it is an empty ACL, as opposed to a nonexistent ACL. If the ACL is subsequently applied to an object, it will implicitly deny all access.

Parameters

Acl

A pointer to a buffer in which the function will store a new ACL data structure.

The ACL data structure has the following form:

typedef struct _ACL { /* acl */

BYTE AclRevision;

BYTE Sbz1;

WORD AclSize;

WORD AceCount;

WORD Sbz2;

} ACL;

AclLength

Specifies the length, in bytes, of the buffer pointed to by Acl. This value must be large enough to contain the ACL header and all of the ACEs that are to be stored in the ACL.

AclRevision

Specifies the revision level of the ACL the function will build. This parameter must be set to ACL_REVISION2 in this version of Win32.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

AddAccessAllowedAce, AddAce, DeleteAce, GetAce, GetAclInformation, IsValidAcl, SetAclInformation