Skip to content

Conversation

@SEt-t
Copy link
Contributor

@SEt-t SEt-t commented Dec 9, 2025

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::Initialize should also be gracefully handled.

References and Relevant Issues

#19634

Detailed Description of the Pull Request / Additional comments

PR Checklist

@SEt-t
Copy link
Contributor Author

SEt-t commented Dec 9, 2025

@microsoft-github-policy-service agree

@DHowett DHowett requested a review from lhecker December 9, 2025 21:11
@DHowett
Copy link
Member

DHowett commented Dec 9, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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);
Copy link
Member

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>
Copy link
Member

@lhecker lhecker left a 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!

@SEt-t
Copy link
Contributor Author

SEt-t commented Dec 9, 2025

Yes, wil::CoCreateInstanceNoThrow seems to do exactly the same, so I've updated the code.

@lhecker
Copy link
Member

lhecker commented Dec 9, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@DHowett DHowett left a 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!

@DHowett
Copy link
Member

DHowett commented Dec 9, 2025

hmm.. it's still upset about the code format

@DHowett
Copy link
Member

DHowett commented Dec 9, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DHowett DHowett enabled auto-merge (squash) December 9, 2025 22:14
@DHowett DHowett merged commit 8bb831f into microsoft:main Dec 9, 2025
14 of 16 checks passed
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.23 Servicing Pipeline Dec 9, 2025
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.24 Servicing Pipeline 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Cherry Pick
Status: Cherry Picked
Status: Cherry Picked

Development

Successfully merging this pull request may close these issues.

3 participants