-
Notifications
You must be signed in to change notification settings - Fork 9k
Gracefully handle unavailable TSF from SYSTEM account #19635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@microsoft-github-policy-service agree |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could just use wil::CoCreateInstanceNoThrow<ITfCategoryMgr> directly, to make it more readable right?
Co-authored-by: Leonard Hecker <leonard@hecker.io>
lhecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
|
Yes, |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
DHowett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for doing this!
|
hmm.. it's still upset about the code format |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
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
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