The following C# code example terminates a process instance
with the identifier value of 756c22860a242fb101ec7a5bc0977fd6.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.IO ;
namespace TerminateProcess
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
try
{
//Create a ProcessManagerService object and set authentication values
ProcessManagerService processManager = new ProcessManagerService();
processManager.Credentials = new System.Net.NetworkCredential("administrator", "password");
//Terminate a running process instance
processManager.terminateProcess("5fae07190a242fb1010b2229ccad8a7e");
}
catch (Exception ee)
{
Console.WriteLine(ee.Message);
}
}
}
}
|
|
|