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.
5 #include "base/process/process_handle.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/win/scoped_handle.h"
11 #include "base/win/windows_version.h"
15 ProcessId
GetCurrentProcId() {
16 return ::GetCurrentProcessId();
19 ProcessHandle
GetCurrentProcessHandle() {
20 return ::GetCurrentProcess();
23 ProcessId
GetProcId(ProcessHandle process
) {
24 // This returns 0 if we have insufficient rights to query the process handle.
25 return GetProcessId(process
);