win_util.h (1054B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 // This is a partial implementation of Chromium's source file 8 // base/win/win_util.h 9 10 #ifndef BASE_WIN_WIN_UTIL_H_ 11 #define BASE_WIN_WIN_UTIL_H_ 12 13 #include <minwindef.h> 14 #include <string> 15 16 #include "base/base_export.h" 17 18 namespace base { 19 namespace win { 20 21 inline HANDLE Uint32ToHandle(uint32_t h) { 22 return reinterpret_cast<HANDLE>( 23 static_cast<uintptr_t>(static_cast<int32_t>(h))); 24 } 25 26 // Returns the name of a desktop or a window station. 27 BASE_EXPORT std::wstring GetWindowObjectName(HANDLE handle); 28 29 // IsAppVerifierLoaded() indicates whether Application Verifier is *already* 30 // loaded into the current process. 31 BASE_EXPORT bool IsAppVerifierLoaded(); 32 33 } // namespace win 34 } // namespace base 35 36 #endif // BASE_WIN_WIN_UTIL_H_