]> cygwin.com Git - cygwin-apps/setup.git/blob - processlist.h
Suppress bogus free-nonheap-object warning in iniparse.cc
[cygwin-apps/setup.git] / processlist.h
1 /*
2 * Copyright (c) 2013 Jon TURNEY
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 */
13
14 #include <windows.h>
15 #include <vector>
16 #include <string>
17
18 // ---------------------------------------------------------------------------
19 // interface to class Process
20 //
21 // access to a Windows process
22 // ---------------------------------------------------------------------------
23
24 class Process;
25
26 // utility type ProcessList, a vector of Process
27 typedef std::vector<Process> ProcessList;
28
29 class Process
30 {
31 public:
32 Process (DWORD pid);
33 std::string getName (void);
34 DWORD getProcessID (void);
35 void kill (int force);
36 bool isModuleLoadedInProcess (const WCHAR *moduleName);
37 static ProcessList listProcessesWithModuleLoaded (const WCHAR *moduleName);
38 private:
39 DWORD processID;
40 static ProcessList snapshot (void);
41 };
This page took 0.037807 seconds and 5 git commands to generate.