mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
boot: cleanup CoreCLR.cpp
This commit is contained in:
parent
af29419cc9
commit
1aea55f6aa
1 changed files with 0 additions and 24 deletions
|
|
@ -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<HMODULE>(m_calling_module), &calling_module_path[0], static_cast<DWORD>(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<void*>(load_library(calling_module_path.c_str()));
|
||||
if (!lib_nethost)
|
||||
return -1;
|
||||
|
||||
auto get_hostfxr_path = reinterpret_cast<get_hostfxr_path_type>(
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue