NativeObjectSecurity.Persist 方法

定義

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。

多載

名稱 Description
Persist(SafeHandle, AccessControlSections)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議。persist 傳遞給建構子與持久化方法的參數值 includeSections 必須相同。

Persist(String, AccessControlSections)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

Persist(SafeHandle, AccessControlSections, Object)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

Persist(String, AccessControlSections, Object)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

Persist(SafeHandle, AccessControlSections)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議。persist 傳遞給建構子與持久化方法的參數值 includeSections 必須相同。

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

該物件所關聯 NativeObjectSecurity 的可保障物件的柄。

includeSections
AccessControlSections

AccessControlSections 舉值之一,指定安全描述符中要儲存的可安全物件的區段(存取規則、稽核規則、擁有者、主要群組)。

例外狀況

該物件所關聯 NativeObjectSecurity 的可保護物件要麼是目錄,要麼是檔案,而該目錄或檔案無法被找到。

備註

在持久NativeObjectSecurity化物件時,如果傳遞給Persist方法的參數值includeSectionsincludeSections傳給建立該NativeObjectSecurity物件的建構子的參數值不完全相同,持久NativeObjectSecurity化物件的某些區段可能包含不可預測的值。 例如,若一個建構子被呼叫為 includeSectionsAccess,之後 Persist 在該物件上呼叫一個方法為 includeSectionsAll,所得的持久 NativeObjectSecurity 物件將包含其審計規則、群組與擁有者的不可預測值。

適用於

Persist(String, AccessControlSections)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

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

該物件所關聯 NativeObjectSecurity 的可擔保物件名稱。

includeSections
AccessControlSections

AccessControlSections 舉值之一,指定安全描述符中要儲存的可安全物件的區段(存取規則、稽核規則、擁有者、主要群組)。

例外狀況

該物件所關聯 NativeObjectSecurity 的可保護物件要麼是目錄,要麼是檔案,而該目錄或檔案無法被找到。

備註

在持久NativeObjectSecurity化物件時,如果傳遞給Persist方法的參數值includeSectionsincludeSections傳給建立該NativeObjectSecurity物件的建構子的參數值不完全相同,持久NativeObjectSecurity化物件的某些區段可能包含不可預測的值。 例如,若一個建構子被呼叫為 includeSectionsAccess,之後 Persist 在該物件上呼叫一個方法為 includeSectionsAll,所得的持久 NativeObjectSecurity 物件將包含其審計規則、群組與擁有者的不可預測值。

適用於

Persist(SafeHandle, AccessControlSections, Object)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

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

該物件所關聯 NativeObjectSecurity 的可保障物件的柄。

includeSections
AccessControlSections

AccessControlSections 舉值之一,指定安全描述符中要儲存的可安全物件的區段(存取規則、稽核規則、擁有者、主要群組)。

exceptionContext
Object

包含例外來源或目的地的上下文資訊的物件。

例外狀況

該物件所關聯 NativeObjectSecurity 的可保護物件要麼是目錄,要麼是檔案,而該目錄或檔案無法被找到。

備註

在持久NativeObjectSecurity化物件時,如果傳遞給Persist方法的參數值includeSectionsincludeSections傳給建立該NativeObjectSecurity物件的建構子的參數值不完全相同,持久NativeObjectSecurity化物件的某些區段可能包含不可預測的值。 例如,若一個建構子被呼叫為 includeSectionsAccess,之後 Persist 在該物件上呼叫一個方法為 includeSectionsAll,所得的持久 NativeObjectSecurity 物件將包含其審計規則、群組與擁有者的不可預測值。

適用於

Persist(String, AccessControlSections, Object)

將與此 NativeObjectSecurity 物件相關的安全描述符指定區段儲存為永久儲存。 我們建議傳給建構子與持久化方法的參數值 includeSections 應相同。

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

該物件所關聯 NativeObjectSecurity 的可擔保物件名稱。

includeSections
AccessControlSections

AccessControlSections 舉值之一,指定安全描述符中要儲存的可安全物件的區段(存取規則、稽核規則、擁有者、主要群組)。

exceptionContext
Object

包含例外來源或目的地的上下文資訊的物件。

例外狀況

該物件所關聯 NativeObjectSecurity 的可保護物件要麼是目錄,要麼是檔案,而該目錄或檔案無法被找到。

備註

在持久NativeObjectSecurity化物件時,如果傳遞給Persist方法的參數值includeSectionsincludeSections傳給建立該NativeObjectSecurity物件的建構子的參數值不完全相同,持久NativeObjectSecurity化物件的某些區段可能包含不可預測的值。 例如,若一個建構子被呼叫為 includeSectionsAccess,之後 Persist 在該物件上呼叫一個方法為 includeSectionsAll,所得的持久 NativeObjectSecurity 物件將包含其審計規則、群組與擁有者的不可預測值。

適用於