| 8 | namespace op::hook { |
| 9 | |
| 10 | inline std::wstring ResolveHookModuleName(bool target_is64) { |
| 11 | const std::wstring current = RuntimeEnvironment::getOpName(); |
| 12 | if (target_is64 == (OP64 != 0) && !current.empty()) { |
| 13 | return current; |
| 14 | } |
| 15 | |
| 16 | if (current.find(L"op_c_api") != std::wstring::npos) { |
| 17 | return target_is64 ? L"op_c_api_x64.dll" : L"op_c_api_x86.dll"; |
| 18 | } |
| 19 | return target_is64 ? L"op_x64.dll" : L"op_x86.dll"; |
| 20 | } |
| 21 | |
| 22 | } // namespace op::hook |
no test coverage detected