NativeObjectSecurity.Persist NativeObjectSecurity.Persist NativeObjectSecurity.Persist NativeObjectSecurity.Persist Method

定義

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage.

多載

Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

將與這個 NativeObjectSecurity 物件相關聯的安全性描述元的指定區段儲存到永久儲存體。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議您保留傳遞到建構函式的 includeSections 參數值,並維持方法相同。We recommend.persist that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

將與這個 NativeObjectSecurity 物件相關聯的安全性描述元的指定區段儲存到永久儲存體。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議您保留傳遞到建構函式的 includeSections 參數值,並維持方法相同。We recommend.persist that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 override void Persist(System::Runtime::InteropServices::SafeHandle ^ handle, System::Security::AccessControl::AccessControlSections includeSections);
protected override sealed void Persist (System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections);
override this.Persist : System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections -> unit
Protected Overrides NotOverridable Sub Persist (handle As SafeHandle, includeSections As AccessControlSections)

參數

handle
SafeHandle SafeHandle SafeHandle SafeHandle

與這個 NativeObjectSecurity 物件關聯之安全物件的控制代碼。The handle of the securable object with which this NativeObjectSecurity object is associated.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

例外狀況

與這個 NativeObjectSecurity 物件關聯的安全物件為目錄或檔案,但找不到該目錄或檔案。The securable object with which this NativeObjectSecurity object is associated is either a directory or a file, and that directory or file could not be found.

備註

保存NativeObjectSecurity物件時, 如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該NativeObjectSecurity物件之includeSections函數的參數值不相同, 區段保存NativeObjectSecurity物件的可能包含無法預測的值。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. 例如, 如果includeSections使用的Access值來呼叫一個函式, 而稍後Persist在該物件上All呼叫includeSections方法, 且其值為, 則產生的持續NativeObjectSecurity性物件將會包含無法預測的值, 適用于其審核規則、群組和擁有者。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.

Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 override void Persist(System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections);
protected override sealed void Persist (string name, System.Security.AccessControl.AccessControlSections includeSections);
override this.Persist : string * System.Security.AccessControl.AccessControlSections -> unit
Protected Overrides NotOverridable Sub Persist (name As String, includeSections As AccessControlSections)

參數

name
String String String String

安全物件的名稱,這個 NativeObjectSecurity 物件與其相關聯。The name of the securable object with which this NativeObjectSecurity object is associated.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

例外狀況

與這個 NativeObjectSecurity 物件關聯的安全物件為目錄或檔案,但找不到該目錄或檔案。The securable object with which this NativeObjectSecurity object is associated is either a directory or a file, and that directory or file could not be found.

備註

保存NativeObjectSecurity物件時, 如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該NativeObjectSecurity物件之includeSections函數的參數值不相同, 區段保存NativeObjectSecurity物件的可能包含無法預測的值。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. 例如, 如果includeSections使用的Access值來呼叫一個函式, 而稍後Persist在該物件上All呼叫includeSections方法, 且其值為, 則產生的持續NativeObjectSecurity性物件將會包含無法預測的值, 適用于其審核規則、群組和擁有者。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.

Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 void Persist(System::Runtime::InteropServices::SafeHandle ^ handle, System::Security::AccessControl::AccessControlSections includeSections, System::Object ^ exceptionContext);
protected void Persist (System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, object exceptionContext);
override this.Persist : System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections * obj -> unit
Protected Sub Persist (handle As SafeHandle, includeSections As AccessControlSections, exceptionContext As Object)

參數

handle
SafeHandle SafeHandle SafeHandle SafeHandle

與這個 NativeObjectSecurity 物件關聯之安全物件的控制代碼。The handle of the securable object with which this NativeObjectSecurity object is associated.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

exceptionContext
Object Object Object Object

包含有關例外狀況的來源或目的地之內容資訊的物件。An object that contains contextual information about the source or destination of the exception.

例外狀況

與這個 NativeObjectSecurity 物件關聯的安全物件為目錄或檔案,但找不到該目錄或檔案。The securable object with which this NativeObjectSecurity object is associated is either a directory or a file, and that directory or file could not be found.

備註

保存NativeObjectSecurity物件時, 如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該NativeObjectSecurity物件之includeSections函數的參數值不相同, 區段保存NativeObjectSecurity物件的可能包含無法預測的值。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. 例如, 如果includeSections使用的Access值來呼叫一個函式, 而稍後Persist在該物件上All呼叫includeSections方法, 且其值為, 則產生的持續NativeObjectSecurity性物件將會包含無法預測的值, 適用于其審核規則、群組和擁有者。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.

Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object)

將與這個 NativeObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 void Persist(System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections, System::Object ^ exceptionContext);
protected void Persist (string name, System.Security.AccessControl.AccessControlSections includeSections, object exceptionContext);
override this.Persist : string * System.Security.AccessControl.AccessControlSections * obj -> unit
Protected Sub Persist (name As String, includeSections As AccessControlSections, exceptionContext As Object)

參數

name
String String String String

安全物件的名稱,這個 NativeObjectSecurity 物件與其相關聯。The name of the securable object with which this NativeObjectSecurity object is associated.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

exceptionContext
Object Object Object Object

包含有關例外狀況的來源或目的地之內容資訊的物件。An object that contains contextual information about the source or destination of the exception.

例外狀況

與這個 NativeObjectSecurity 物件關聯的安全物件為目錄或檔案,但找不到該目錄或檔案。The securable object with which this NativeObjectSecurity object is associated is either a directory or a file, and that directory or file could not be found.

備註

保存NativeObjectSecurity物件時, 如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該NativeObjectSecurity物件之includeSections函數的參數值不相同, 區段保存NativeObjectSecurity物件的可能包含無法預測的值。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. 例如, 如果includeSections使用的Access值來呼叫一個函式, 而稍後Persist在該物件上All呼叫includeSections方法, 且其值為, 則產生的持續NativeObjectSecurity性物件將會包含無法預測的值, 適用于其審核規則、群組和擁有者。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.

適用於