/[RomCheater]/trunk/Win32/libWin32/Win32/Threading/ProcessUtils.cs
ViewVC logotype

Contents of /trunk/Win32/libWin32/Win32/Threading/ProcessUtils.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 471 - (show annotations) (download)
Mon Jun 3 07:13:44 2013 UTC (7 years, 3 months ago) by william
File size: 565 byte(s)
+ pass process informatin by using the process's PID, instead of passing the process as a reference

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Diagnostics;
6
7 namespace libWin32.Win32.Threading
8 {
9 public static class ProcessUtils
10 {
11 private static Process RawProcess(int pid) { return Process.GetProcessById(pid); }
12 public static string ProcessName(int pid)
13 {
14 string name = string.Empty;
15 using (Process p = RawProcess(pid))
16 {
17 name = p.ToString();
18 }
19 return name;
20 }
21 }
22 }

  ViewVC Help
Powered by ViewVC 1.1.22