summaryrefslogtreecommitdiff
path: root/src/envmodule.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-12 02:45:03 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-12 02:45:03 -0400
commitac6bc5fd01e115d523de65a02e46b2cde1188d37 (patch)
tree6849ce32e1f869b3fc39d01e26e06607104297bf /src/envmodule.h
parentbf3d7527801bcba16ba01735efd3d5acc052f485 (diff)
testForSteam() now uses env to get processes
moved processes from env.cpp to envmodule.cpp, merged what crash dumps did with what was in testForSteam()
Diffstat (limited to 'src/envmodule.h')
-rw-r--r--src/envmodule.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/envmodule.h b/src/envmodule.h
index 3f0f99ab..deb7520f 100644
--- a/src/envmodule.h
+++ b/src/envmodule.h
@@ -12,7 +12,7 @@ namespace env
class Module
{
public:
- explicit Module(QString path, std::size_t fileSize);
+ Module(QString path, std::size_t fileSize);
// returns the module's path
//
@@ -96,6 +96,28 @@ private:
};
+// represents one process
+//
+class Process
+{
+public:
+ Process(DWORD pid, QString name);
+
+ DWORD pid() const;
+ const QString& name() const;
+
+ // whether this process can be accessed; fails if the current process doesn't
+ // have the proper permissions
+ //
+ bool canAccess() const;
+
+private:
+ DWORD m_pid;
+ QString m_name;
+};
+
+
+std::vector<Process> getRunningProcesses();
std::vector<Module> getLoadedModules();
} // namespace env