diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-04-30 23:05:09 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-04-30 23:05:09 +0200 |
commit | ff40dcd83f7cc74446ee90a911b58c165b6e164f (patch) | |
tree | ac9a96706c340f4ac533be173cceda24a5740764 /platform/windows/os_windows.cpp | |
parent | f938793e7892639d5cea894aae447ed256f51c41 (diff) | |
parent | 2cd8e86aa016fe8c61a48889529aa81284f6d889 (diff) |
Merge pull request #4488 from vnen/pr-windows-pid
Implement OS.get_process_ID for Windows
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r-- | platform/windows/os_windows.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 9def8d4f9c..d0453f0d8e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -55,6 +55,7 @@ #include "shlobj.h" #include <regstr.h> +#include <process.h> static const WORD MAX_CONSOLE_LINES = 1500; @@ -1884,6 +1885,10 @@ Error OS_Windows::kill(const ProcessID& p_pid) { return ret != 0?OK:FAILED; }; +int OS_Windows::get_process_ID() const { + return _getpid(); +} + Error OS_Windows::set_cwd(const String& p_cwd) { if (_wchdir(p_cwd.c_str())!=0) |