From de74dbcbac6ea407fd7bf9e232fbfa95b127e84e Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Mon, 8 Sep 2025 09:05:01 -0500 Subject: [PATCH] don't reinitialize com --- support/src/utils/windows.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/support/src/utils/windows.cpp b/support/src/utils/windows.cpp index 5c46d858..aafcb0e8 100644 --- a/support/src/utils/windows.cpp +++ b/support/src/utils/windows.cpp @@ -23,7 +23,6 @@ #include "utils/windows.hpp" -#include "utils/com_init_wrapper.hpp" #include "utils/error.hpp" #include "utils/file.hpp" #include "utils/path.hpp" @@ -143,8 +142,6 @@ auto run_process_elevated(std::vector args) -> int { void set_last_error_code(DWORD error_code) { ::SetLastError(error_code); } auto get_startup_folder() -> std::wstring { - utils::com_init_wrapper wrapper; - PWSTR raw{nullptr}; auto result = ::SHGetKnownFolderPath(FOLDERID_Startup, 0, nullptr, &raw); if (FAILED(result)) { @@ -163,8 +160,6 @@ auto get_startup_folder() -> std::wstring { auto create_shortcut(const shortcut_cfg &cfg, bool overwrite_existing) -> bool { REPERTORY_USES_FUNCTION_NAME(); - utils::com_init_wrapper wrapper; - const auto hr_hex = [](HRESULT result) -> std::string { std::ostringstream oss; oss << "0x" << std::uppercase << std::hex << std::setw(8)