Saves the specified sections of the security descriptor associated with this System.Security.AccessControl.NativeObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical. For more information, see Remarks.
- handle
- The handle of the securable object with which this System.Security.AccessControl.NativeObjectSecurity object is associated.
- includeSections
- One of the System.Security.AccessControl.AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.
When persisting a System.Security.AccessControl.NativeObjectSecurity object, if the value of the includeSections parameter passed to the NativeObjectSecurity.Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that System.Security.AccessControl.NativeObjectSecurity object, sections of the persisted System.Security.AccessControl.NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of AccessControlSections.Access, and later a NativeObjectSecurity.Persist method is called on that object with an includeSections value of AccessControlSections.All, the resulting persisted System.Security.AccessControl.NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.