Export (0) Print
Expand All

HostProtectionAttribute.ExternalProcessMgmt Property

Note: This property is new in the .NET Framework version 2.0.

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)

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft