Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: sandbox/win/tests/integration_tests/hooking_dll.cc

Issue 1835003003: [Windows Sandbox] MITIGATION_EXTENSION_POINT_DISABLE support for children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny cleanup - strange link error only on win8_chromium_ng try bot. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 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 <windows.h>
6 #include <stdio.h>
7
8 #pragma data_seg(".shared")
9 BOOL hook_called = false;
10 #pragma data_seg()
11 #pragma comment(linker, "/SECTION:.shared,RWS")
12
13 extern "C" __declspec(dllexport) BOOL WasHookCalled() {
14 return hook_called;
15 }
16
17 extern "C" __declspec(dllexport) LRESULT
18 HookProc(int code, WPARAM wParam, LPARAM lParam) {
19 // Supported versions of Windows do not require the HHOOK to be passed along.
20 hook_called = true;
21 return CallNextHookEx(NULL, code, wParam, lParam);
22 }
23
24 BOOL WINAPI DllMain(__in HINSTANCE hinstDLL,
25 __in DWORD reason,
26 __in LPVOID lpvReserved) {
27 return TRUE;
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698