Runner: move Launcher to its own folder and simplify dll loading (#4379)

This commit is contained in:
Andrey Nekrasov
2020-06-22 13:01:33 +03:00
committed by GitHub
parent bef14f551e
commit 8c6085b933
5 changed files with 22 additions and 47 deletions

View File

@@ -7,9 +7,9 @@ std::map<std::wstring, PowertoyModule>& modules()
return modules;
}
PowertoyModule load_powertoy(const std::wstring& filename)
PowertoyModule load_powertoy(const std::wstring_view filename)
{
auto handle = winrt::check_pointer(LoadLibraryW(filename.c_str()));
auto handle = winrt::check_pointer(LoadLibraryW(filename.data()));
auto create = reinterpret_cast<powertoy_create_func>(GetProcAddress(handle, "powertoy_create"));
if (!create)
{