Gracefully handle unavailable TSF from SYSTEM account#19635
Merged
DHowett merged 4 commits intomicrosoft:mainfrom Dec 9, 2025
Merged
Gracefully handle unavailable TSF from SYSTEM account#19635DHowett merged 4 commits intomicrosoft:mainfrom
DHowett merged 4 commits intomicrosoft:mainfrom
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
DHowett
reviewed
Dec 9, 2025
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lhecker
reviewed
Dec 9, 2025
lhecker
reviewed
Dec 9, 2025
src/tsf/Implementation.cpp
Outdated
| bool Implementation::Initialize() | ||
| { | ||
| _categoryMgr = wil::CoCreateInstance<ITfCategoryMgr>(CLSID_TF_CategoryMgr, CLSCTX_INPROC_SERVER); | ||
| _categoryMgr = wil::CoCreateInstance<ITfCategoryMgr, wil::err_returncode_policy>(CLSID_TF_CategoryMgr, CLSCTX_INPROC_SERVER); |
Member
There was a problem hiding this comment.
This could just use wil::CoCreateInstanceNoThrow<ITfCategoryMgr> directly, to make it more readable right?
Co-authored-by: Leonard Hecker <leonard@hecker.io>
lhecker
approved these changes
Dec 9, 2025
Member
lhecker
left a comment
There was a problem hiding this comment.
I'd be happy to see the CoCreateInstance call changed, if you don't mind, but I'm also very happy with the current state of the PR.
Thanks for reporting and fixing this!
Contributor
Author
|
Yes, |
lhecker
approved these changes
Dec 9, 2025
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
DHowett
approved these changes
Dec 9, 2025
Member
DHowett
left a comment
There was a problem hiding this comment.
Thanks so much for doing this!
Member
|
hmm.. it's still upset about the code format |
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
DHowett
approved these changes
Dec 9, 2025
DHowett
pushed a commit
that referenced
this pull request
Dec 9, 2025
When run from SYSTEM account TSF seems to be unavailable. The only missing step to handle that is check during initialization. Not sure if fail after partial success in `Implementation::Initialize` should also be gracefully handled. Closes #19634 (cherry picked from commit 8bb831f) Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgiXm14 Service-Version: 1.24
DHowett
pushed a commit
that referenced
this pull request
Dec 9, 2025
When run from SYSTEM account TSF seems to be unavailable. The only missing step to handle that is check during initialization. Not sure if fail after partial success in `Implementation::Initialize` should also be gracefully handled. Closes #19634 (cherry picked from commit 8bb831f) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgiXm18 Service-Version: 1.23
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.
Summary of the Pull Request
When run from SYSTEM account TSF seems to be unavailable. The only missing step to handle that is check during initialization.
Not sure if fail after partial success in
Implementation::Initializeshould also be gracefully handled.References and Relevant Issues
#19634
Detailed Description of the Pull Request / Additional comments
PR Checklist