| 20 | |
| 21 | template<typename T> |
| 22 | T GetProc(Util::null_terminated_string_view proc) |
| 23 | { |
| 24 | if (const auto ptr = GetProcAddress(m_hMod.get(), proc.c_str())) |
| 25 | { |
| 26 | return reinterpret_cast<T>(ptr); |
| 27 | } |
| 28 | else |
| 29 | { |
| 30 | LastErrorHandle(spdlog::level::critical, L"Failed to get address of procedure"); |
| 31 | } |
| 32 | } |
| 33 | }; |