aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/pdb/process.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/pdb/process.hpp')
-rw-r--r--include/pdb/process.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/pdb/process.hpp b/include/pdb/process.hpp
new file mode 100644
index 0000000..3ddb6b4
--- /dev/null
+++ b/include/pdb/process.hpp
@@ -0,0 +1,32 @@
+#pragma once
+
+#include "handle.hpp"
+
+#include <windows.h>
+
+#include <string>
+
+namespace pdb {
+
+class Process {
+public:
+ using ID = DWORD;
+
+ static Process current();
+ static Process open(ID);
+
+ ID get_id() const { return id; }
+
+ const Handle& get_handle() const { return handle; }
+
+ std::string get_executable_path() const;
+
+private:
+ explicit Process(Handle&&);
+ Process(ID, Handle&&);
+
+ ID id;
+ Handle handle;
+};
+
+} // namespace pdb