| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ | |
| 6 #define SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ | |
| 7 | |
| 8 #include <windows.h> | |
| 9 #include "sandbox/win/src/sandbox_types.h" | |
| 10 | |
| 11 namespace sandbox { | |
| 12 | |
| 13 extern "C" { | |
| 14 | |
| 15 typedef BOOL (WINAPI* GdiDllInitializeFunction) ( | |
| 16 HANDLE dll, | |
| 17 DWORD reason, | |
| 18 LPVOID reserved); | |
| 19 | |
| 20 typedef HGDIOBJ (WINAPI *GetStockObjectFunction) (int object); | |
| 21 | |
| 22 typedef ATOM (WINAPI *RegisterClassWFunction) (const WNDCLASS* wnd_class); | |
| 23 | |
| 24 // Interceptor for the GdiDllInitialize function. | |
| 25 SANDBOX_INTERCEPT BOOL WINAPI TargetGdiDllInitialize( | |
| 26 GdiDllInitializeFunction orig_gdi_dll_initialize, | |
| 27 HANDLE dll, | |
| 28 DWORD reason); | |
| 29 | |
| 30 // Interceptor for the GetStockObject function. | |
| 31 SANDBOX_INTERCEPT HGDIOBJ WINAPI TargetGetStockObject( | |
| 32 GetStockObjectFunction orig_get_stock_object, | |
| 33 int object); | |
| 34 | |
| 35 // Interceptor for the RegisterClassW function. | |
| 36 SANDBOX_INTERCEPT ATOM WINAPI TargetRegisterClassW( | |
| 37 RegisterClassWFunction orig_register_class_function, | |
| 38 const WNDCLASS* wnd_class); | |
| 39 | |
| 40 } // extern "C" | |
| 41 | |
| 42 } // namespace sandbox | |
| 43 | |
| 44 #endif // SANDBOX_SRC_PROCESS_MITIGATIONS_WIN32K_INTERCEPTION_H_ | |
| 45 | |
| OLD | NEW |