From 14c323cb2811fff82dacc876d63dc5c2d1f2a1aa Mon Sep 17 00:00:00 2001 From: Tu Dinh <1257909+dinhngtu@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:26:55 +0100 Subject: [PATCH] cleanup DeactivateProfiles --- VietTypeATL/Register.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/VietTypeATL/Register.cpp b/VietTypeATL/Register.cpp index a495bc2..dcdd5e2 100644 --- a/VietTypeATL/Register.cpp +++ b/VietTypeATL/Register.cpp @@ -294,10 +294,6 @@ extern "C" HRESULT __cdecl DeactivateProfiles() { HRESULT hr; LSTATUS err; - CComPtr profileMgr; - hr = profileMgr.CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER); - HRESULT_CHECK_RETURN(hr, L"%s", L"profileMgr.CoCreateInstance failed"); - hr = InstallTip(false); HRESULT_CHECK_RETURN(hr, L"%s", L"InstallTip failed"); @@ -305,9 +301,7 @@ extern "C" HRESULT __cdecl DeactivateProfiles() { CRegKey key; err = key.Create(HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes", nullptr, 0, KEY_SET_VALUE); WINERROR_CHECK_RETURN_HRESULT(err, L"%s", L"key.Create(Keyboard Layout\\Substitutes) failed"); - - err = key.DeleteValue(L"0000042a"); - WINERROR_CHECK_RETURN_HRESULT(err, L"%s", L"key.SetStringValue failed"); + key.DeleteValue(L"0000042a"); } return S_OK;