OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/process/process_handle.h" | |
6 | |
7 #include <windows.h> | |
8 | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/win/scoped_handle.h" | |
11 #include "base/win/windows_version.h" | |
12 | |
13 namespace base { | |
14 | |
15 ProcessId GetCurrentProcId() { | |
16 return ::GetCurrentProcessId(); | |
17 } | |
18 | |
19 ProcessHandle GetCurrentProcessHandle() { | |
20 return ::GetCurrentProcess(); | |
21 } | |
22 | |
23 ProcessId GetProcId(ProcessHandle process) { | |
24 // This returns 0 if we have insufficient rights to query the process handle. | |
25 return GetProcessId(process); | |
26 } | |
27 | |
28 } // namespace base | |
OLD | NEW |