diff --git a/lib/CoreCLR/CoreCLR.cpp b/lib/CoreCLR/CoreCLR.cpp index 72f3d0f91..e1d027f52 100644 --- a/lib/CoreCLR/CoreCLR.cpp +++ b/lib/CoreCLR/CoreCLR.cpp @@ -20,30 +20,6 @@ int CoreCLR::load_hostfxr() int CoreCLR::load_hostfxr(const struct get_hostfxr_parameters* parameters) { - /* - // Get the path to CoreCLR's hostfxr - std::wstring calling_module_path(MAX_PATH, L'\0'); - - do - { - calling_module_path.resize(GetModuleFileNameW(static_cast(m_calling_module), &calling_module_path[0], static_cast(calling_module_path.size()))); - } - while (!calling_module_path.empty() && GetLastError() == ERROR_INSUFFICIENT_BUFFER); - if (calling_module_path.empty()) - return -1; - - calling_module_path = (std::filesystem::path(calling_module_path).parent_path() / L"nethost.dll").wstring(); - - auto lib_nethost = reinterpret_cast(load_library(calling_module_path.c_str())); - if (!lib_nethost) - return -1; - - auto get_hostfxr_path = reinterpret_cast( - get_export(lib_nethost, "get_hostfxr_path")); - if (!get_hostfxr_path) - return -1; - */ - wchar_t buffer[MAX_PATH]{}; size_t buffer_size = sizeof buffer / sizeof(wchar_t); if (int rc = get_hostfxr_path(buffer, &buffer_size, parameters); rc != 0)