Skip to content

Commit

Permalink
cleanup DeactivateProfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhngtu committed Jan 15, 2024
1 parent 60fd695 commit 14c323c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions VietTypeATL/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,20 +294,14 @@ extern "C" HRESULT __cdecl DeactivateProfiles() {
HRESULT hr;
LSTATUS err;

CComPtr<ITfInputProcessorProfileMgr> 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");

{
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;
Expand Down

0 comments on commit 14c323c

Please sign in to comment.