diff options
| author | Stefan Boberg <[email protected]> | 2023-06-16 13:37:36 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-06-16 13:37:36 +0200 |
| commit | 5be092be044c2c1a3ed829b8796078d22648016e (patch) | |
| tree | f3c6fffebba6f53037ed744eaa9829511bb17a2b /src/zencore/thread.cpp | |
| parent | Improve resonse messages from jupiter upstream (#333) (diff) | |
| download | zen-5be092be044c2c1a3ed829b8796078d22648016e.tar.xz zen-5be092be044c2c1a3ed829b8796078d22648016e.zip | |
added GetProcessId
this enables mapping the result of a CreateProc call to an integer pid
Diffstat (limited to 'src/zencore/thread.cpp')
| -rw-r--r-- | src/zencore/thread.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp index 52b1e5d4e..67a0878d0 100644 --- a/src/zencore/thread.cpp +++ b/src/zencore/thread.cpp @@ -1095,6 +1095,16 @@ GetCurrentThreadId() #endif } +int +GetProcessId(CreateProcResult ProcId) +{ +#if ZEN_PLATFORM_WINDOWS + return static_cast<int>(::GetProcessId(ProcId)); +#else + return ProcId; +#endif +} + void Sleep(int ms) { |