This documentation is archived and is not being maintained.

HostProtectionAttribute.ExternalProcessMgmt Property

Gets or sets a value indicating whether external process management is exposed.

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)

public bool ExternalProcessMgmt { get; set; }
/** @property */
public boolean get_ExternalProcessMgmt ()

/** @property */
public void set_ExternalProcessMgmt (boolean value)

public function get ExternalProcessMgmt () : boolean

public function set ExternalProcessMgmt (value : boolean)

Not applicable.

Property Value

true if external process management is exposed; otherwise, false. The default is false.

Code that exposes external process management might create or destroy other processes.

The following code example illustrates the use of the HostProtectionAttribute attribute with the ExternalProcessMgmt property. This example is part of a larger example provided for the HostProtectionAttribute class.

// The following class is an example of code that exposes 
// external process management.
// Add the LicenseProviderAttribute to the control.
[LicenseProvider (typeof(LicFileLicenseProvider))]
public class MyControl : System.Windows.Forms.Control
    // Create a new, null license.
    private License license = null;

    [HostProtection (ExternalProcessMgmt = true)]
    public MyControl ()
        // Determine if a valid license can be granted.
        bool isValid = LicenseManager.IsValid (typeof(MyControl));
        Console.WriteLine ("The result of the IsValid method call is " + 
            isValid.ToString ());

    protected override void Dispose (bool disposing)
        if (disposing)
            if (license != null)
                license.Dispose ();
                license = null;

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0