Process Class

 

About Process Class

 

Process class is mainly used to retrieve info about running processes.

 

Process Class Methods

 

Process.Exists( string ProcessName ) returns true if the specified process exists or false otherwise.

string ProcessName: process name.

 

Process.Count( string ProcessName ) returns the total number of processes running with the given name.

string ProcessName: process name.

 

Code Example

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Giavapps.Windows.API;

public class CodeExample : MonoBehaviour
{

private string ProcessName = "notepad.exe";

void Start()
{
Plugin.Initialize();//Initializes Giavapps Windows API
}

void Update()
{

//Checks if the specified input has been pressed
if(Input.GetKeyDown(KeyCode.Space))
{
Debug.Log("PROCESS EXISTS: "+Process.Exists(ProcessName).ToString());
Debug.Log("PROCESS COUNT: "+Process.Count(ProcessName).ToString());
}

}

void OnApplicationQuit()
{
Plugin.Deinitialize();//Deinitializes Giavapps Windows API
}

}

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Comments are closed.