| 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 #ifndef SANDBOX_SRC_WOW64_H__ | 5 #ifndef SANDBOX_SRC_WOW64_H__ |
| 6 #define SANDBOX_SRC_WOW64_H__ | 6 #define SANDBOX_SRC_WOW64_H__ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/win/scoped_handle.h" | 11 #include "base/win/scoped_handle.h" |
| 12 #include "sandbox/win/src/sandbox_types.h" | 12 #include "sandbox/win/src/sandbox_types.h" |
| 13 | 13 |
| 14 namespace sandbox { | 14 namespace sandbox { |
| 15 | 15 |
| 16 class TargetProcess; | 16 class TargetProcess; |
| 17 | 17 |
| 18 // This class wraps the code needed to interact with the Windows On Windows | 18 // This class wraps the code needed to interact with the Windows On Windows |
| 19 // subsystem on 64 bit OSes, from the point of view of interceptions. | 19 // subsystem on 64 bit OSes, from the point of view of interceptions. |
| 20 class Wow64 { | 20 class Wow64 { |
| 21 public: | 21 public: |
| 22 Wow64(TargetProcess* child, HMODULE ntdll) | 22 Wow64(TargetProcess* child, HMODULE ntdll); |
| 23 : child_(child), ntdll_(ntdll), dll_load_(NULL), continue_load_(NULL) {} | |
| 24 ~Wow64(); | 23 ~Wow64(); |
| 25 | 24 |
| 26 // Waits for the 32 bit DLL to get loaded on the child process. This function | 25 // Waits for the 32 bit DLL to get loaded on the child process. This function |
| 27 // will return immediately if not running under WOW, or launch the helper | 26 // will return immediately if not running under WOW, or launch the helper |
| 28 // process and wait until ntdll is ready. | 27 // process and wait until ntdll is ready. |
| 29 bool WaitForNtdll(); | 28 bool WaitForNtdll(); |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 // Runs the WOW helper process, passing the address of a buffer allocated on | 31 // Runs the WOW helper process, passing the address of a buffer allocated on |
| 33 // the child (one page). | 32 // the child (one page). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 // Event that is signaled on dll load. | 43 // Event that is signaled on dll load. |
| 45 base::win::ScopedHandle dll_load_; | 44 base::win::ScopedHandle dll_load_; |
| 46 // Event to signal to continue execution on the child. | 45 // Event to signal to continue execution on the child. |
| 47 base::win::ScopedHandle continue_load_; | 46 base::win::ScopedHandle continue_load_; |
| 48 DISALLOW_IMPLICIT_CONSTRUCTORS(Wow64); | 47 DISALLOW_IMPLICIT_CONSTRUCTORS(Wow64); |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 } // namespace sandbox | 50 } // namespace sandbox |
| 52 | 51 |
| 53 #endif // SANDBOX_SRC_WOW64_H__ | 52 #endif // SANDBOX_SRC_WOW64_H__ |
| OLD | NEW |