Merged
Conversation
carlos-zamora
approved these changes
Mar 10, 2026
Member
carlos-zamora
left a comment
There was a problem hiding this comment.
Nice/Clean HRESULT transformation 😊
Comment on lines
+76
to
+79
| RETURN_IF_FAILED_EXPECTED(CoCreateInstance(CLSID_TF_CategoryMgr, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(_categoryMgr.addressof()))); | ||
| RETURN_IF_FAILED_EXPECTED(CoCreateInstance(CLSID_TF_DisplayAttributeMgr, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(_displayAttributeMgr.addressof()))); | ||
| // There's no point in calling TF_GetThreadMgr. ITfThreadMgr is a per-thread singleton. | ||
| _threadMgrEx = wil::CoCreateInstance<ITfThreadMgrEx>(CLSID_TF_ThreadMgr, CLSCTX_INPROC_SERVER); | ||
| RETURN_IF_FAILED_EXPECTED(CoCreateInstance(CLSID_TF_ThreadMgr, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(_threadMgrEx.addressof()))); |
Member
There was a problem hiding this comment.
Curious, why'd you use the EXPECTED variant here? Looks like that just doesn't record failures to the error log.
Member
Author
There was a problem hiding this comment.
Since these calls are known to fail on some Windows versions, they're expected to fail and so we don't need to log them, right?
DHowett
pushed a commit
that referenced
this pull request
Mar 12, 2026
Apparently, on some (internal) variants of Windows `TF_CategoryMgr` can exist while `TF_DisplayAttributeMgr` is absent. This is likely a variant configuration error, but we shouldn't crash anyway. Closes MSFT-61309810 (cherry picked from commit 30b1456) Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgnOd-c Service-Version: 1.24
DHowett
pushed a commit
that referenced
this pull request
Mar 12, 2026
Apparently, on some (internal) variants of Windows `TF_CategoryMgr` can exist while `TF_DisplayAttributeMgr` is absent. This is likely a variant configuration error, but we shouldn't crash anyway. Closes MSFT-61309810 (cherry picked from commit 30b1456) Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnOg_4 Service-Version: 1.25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apparently, on some (internal) variants of Windows
TF_CategoryMgrcan exist while
TF_DisplayAttributeMgris absent. This is likelya variant configuration error, but we shouldn't crash anyway.
Closes MSFT-61309810