NativeObjectSecurity.Persist Method (SafeHandle, AccessControlSections, Object)
Saves the specified sections of the security descriptor associated with this 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.
Assembly: mscorlib (in mscorlib.dll)
protected void Persist( SafeHandle handle, AccessControlSections includeSections, Object exceptionContext )
- Type: System.Runtime.InteropServices.SafeHandle
The handle of the securable object with which this NativeObjectSecurity object is associated.
- Type: System.Security.AccessControl.AccessControlSections
One of the AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.
- Type: System.Object
An object that contains contextual information about the source or destination of the exception.
When persisting a NativeObjectSecurity object, if the value of the includeSections parameter passed to the Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that NativeObjectSecurity object, sections of the persisted NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of Access, and later a Persist method is called on that object with an includeSections value of All, the resulting persisted NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.