| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Wow_helper.exe is a simple Win32 64-bit executable designed to help to | 5 // Wow_helper.exe is a simple Win32 64-bit executable designed to help to |
| 6 // sandbox a 32 bit application running on a 64 bit OS. The basic idea is to | 6 // sandbox a 32 bit application running on a 64 bit OS. The basic idea is to |
| 7 // perform a 64 bit interception of the target process and notify the 32-bit | 7 // perform a 64 bit interception of the target process and notify the 32-bit |
| 8 // broker process whenever a DLL is being loaded. This allows the broker to | 8 // broker process whenever a DLL is being loaded. This allows the broker to |
| 9 // setup the interceptions (32-bit) properly on the target. | 9 // setup the interceptions (32-bit) properly on the target. |
| 10 | 10 |
| 11 #include <windows.h> | 11 #include <windows.h> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 DWORD buffer = wcstoul(next, NULL, 0); | 115 DWORD buffer = wcstoul(next, NULL, 0); |
| 116 if (!buffer) | 116 if (!buffer) |
| 117 return 4; | 117 return 4; |
| 118 | 118 |
| 119 void* thunk = reinterpret_cast<void*>(static_cast<ULONG_PTR>(buffer)); | 119 void* thunk = reinterpret_cast<void*>(static_cast<ULONG_PTR>(buffer)); |
| 120 | 120 |
| 121 const size_t kPageSize = 4096; | 121 const size_t kPageSize = 4096; |
| 122 return sandbox::PatchNtdll(child, thunk, kPageSize); | 122 return sandbox::PatchNtdll(child, thunk, kPageSize); |
| 123 } | 123 } |
| OLD | NEW |