HostProtectionAttribute.SelfAffectingProcessMgmt プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As HostProtectionAttribute Dim value As Boolean value = instance.SelfAffectingProcessMgmt instance.SelfAffectingProcessMgmt = value
/** @property */ public boolean get_SelfAffectingProcessMgmt () /** @property */ public void set_SelfAffectingProcessMgmt (boolean value)
public function get SelfAffectingProcessMgmt () : boolean public function set SelfAffectingProcessMgmt (value : boolean)
自己作用型のプロセス管理が公開されている場合は true。それ以外の場合は false。既定値は false です。


SelfAffectingProcessMgmt プロパティを持つ HostProtectionAttribute 属性を使用するコード例を次に示します。このコード例は、HostProtectionAttribute クラスのトピックで取り上げているコード例の一部分です。
' Use the enumeration flags to indicate that this method exposes ' shared state and self-affecting process management. ' Either of the following attribute statements can be used to set the ' resource flags. <HostProtectionAttribute(SharedState := True, _ SelfAffectingProcessMgmt := True), _ HostProtectionAttribute( _ Resources := HostProtectionResource.SharedState Or _ HostProtectionResource.SelfAffectingProcessMgmt)> _ Private Shared Sub [Exit](ByVal Message As String, ByVal Code As Integer) ' Exit the sample when an exception is thrown. Console.WriteLine((ControlChars.Lf & "FAILED: " & Message & " " & _ Code.ToString())) Environment.ExitCode = Code Environment.Exit(Code) End Sub 'Exit
// Use the enumeration flags to indicate that this method exposes // shared state and self-affecting process management. // Either of the following attribute statements can be used to set the // resource flags. [HostProtectionAttribute(SharedState = true, SelfAffectingProcessMgmt = true)] [HostProtectionAttribute(Resources = HostProtectionResource.SharedState | HostProtectionResource.SelfAffectingProcessMgmt)] private static void Exit(string Message, int Code) { // Exit the sample when an exception is thrown. Console.WriteLine("\nFAILED: " + Message + " " + Code.ToString()); Environment.ExitCode = Code; Environment.Exit(Code); }
// Use the enumeration flags to indicate that this method exposes shared state and // self-affecting process management. // Either of the following attribute statements can be used to set the // resource flags. // Exit the sample when an exception is thrown. [HostProtection(SharedState=true,SelfAffectingProcessMgmt=true)] [HostProtection(Resources=HostProtectionResource::SharedState| HostProtectionResource::SelfAffectingProcessMgmt)] static void Exit( String^ Message, int Code ) { Console::WriteLine( "\nFAILED: {0} {1}", Message, Code ); Environment::ExitCode = Code; Environment::Exit( Code ); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HostProtectionAttribute.SelfAffectingProcessMgmt プロパティのページへのリンク