OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sandbox/win/wow_helper/service64_resolver.h" | 5 #include "sandbox/win/wow_helper/service64_resolver.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include "base/bit_cast.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "sandbox/win/wow_helper/target_code.h" | 12 #include "sandbox/win/wow_helper/target_code.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 #pragma pack(push, 1) | 15 #pragma pack(push, 1) |
15 | 16 |
16 const BYTE kMovEax = 0xB8; | 17 const BYTE kMovEax = 0xB8; |
17 const BYTE kMovEdx = 0xBA; | 18 const BYTE kMovEdx = 0xBA; |
18 const USHORT kCallPtrEdx = 0x12FF; | 19 const USHORT kCallPtrEdx = 0x12FF; |
19 const BYTE kRet = 0xC2; | 20 const BYTE kRet = 0xC2; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 337 |
337 // and now change the function to intercept, on the child | 338 // and now change the function to intercept, on the child |
338 if (!::WriteProtectedChildMemory(process_, target_, &local_service, | 339 if (!::WriteProtectedChildMemory(process_, target_, &local_service, |
339 sizeof(local_service))) | 340 sizeof(local_service))) |
340 return STATUS_UNSUCCESSFUL; | 341 return STATUS_UNSUCCESSFUL; |
341 | 342 |
342 return STATUS_SUCCESS; | 343 return STATUS_SUCCESS; |
343 } | 344 } |
344 | 345 |
345 } // namespace sandbox | 346 } // namespace sandbox |
OLD | NEW |