| 139 | } |
| 140 | |
| 141 | bool HookProcessor::Is64BitProcess(HANDLE process_handle) { |
| 142 | if (!RegistryUtilities::Is64BitWindows()) { |
| 143 | // A 64-bit process can never run on the 32-bit OS, |
| 144 | // so the process must be 32-bit. |
| 145 | return false; |
| 146 | } |
| 147 | |
| 148 | // If the processor architecture is not x86, the process could |
| 149 | // be 64-bit, or it could be 32-bit. We still need to determine |
| 150 | // that. |
| 151 | BOOL is_emulated; |
| 152 | ::IsWow64Process(process_handle, &is_emulated); |
| 153 | if (!is_emulated) { |
| 154 | return true; |
| 155 | } |
| 156 | |
| 157 | // The OS is 64-bit, but the process is running in the |
| 158 | // Windows-on-Windows (Wow64) subsystem, so it must be a 64-bit |
| 159 | // process. |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | bool HookProcessor::InstallWindowsHook(const std::string& hook_proc_name, |
| 164 | const int hook_proc_type) { |
nothing calls this directly
no outgoing calls
no test coverage detected