1 // Copyright 2019 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 #ifndef THIRD_PARTY_BASE_WIN_WIN_UTIL_H_ 6 #define THIRD_PARTY_BASE_WIN_WIN_UTIL_H_ 7 8 namespace pdfium { 9 namespace base { 10 namespace win { 11 12 // Returns true if the current process can make USER32 or GDI32 calls such as 13 // CreateWindow and CreateDC. Windows 8 and above allow the kernel component 14 // of these calls to be disabled which can cause undefined behaviour such as 15 // crashes. This function can be used to guard areas of code using these calls 16 // and provide a fallback path if necessary. 17 bool IsUser32AndGdi32Available(); 18 19 } // namespace win 20 } // namespace base 21 } // namespace pdfium 22 23 #endif // THIRD_PARTY_BASE_WIN_WIN_UTIL_H_ 24