Skip to content

DynamicDependencies: Only Detour functions in not-packaged processes#620

Merged
DrusTheAxe merged 3 commits intomainfrom
user/drustheaxe/dyndep-com-getcurrentpackageinfo
Mar 20, 2021
Merged

DynamicDependencies: Only Detour functions in not-packaged processes#620
DrusTheAxe merged 3 commits intomainfrom
user/drustheaxe/dyndep-com-getcurrentpackageinfo

Conversation

@DrusTheAxe
Copy link
Copy Markdown
Member

@DrusTheAxe DrusTheAxe commented Mar 19, 2021

DynamicDependencies only supports not-packaged processes but the Detours hooks were always wired up. Fixed to skip skip that in a packaged process so Microsoft.ProjectReunion.dll can be used in packaged processes for other (not DynDep) features.

Also beefed up parameter validation in the Detour'd GetCurrentPackageInfo[2] to match the OS APIs' parameter validation.

Expanded test cases.

NOTE: Tests verifying package'd process behavior is blocked awaiting Rewrite DynamicDependencies tests using TAEF #559

…not-packaged). Detoured GetCurrentPackageInfo2 incorrectly continued on if there were no dynamic packages in the package graph and GetCurrentPackageInfo2 for the static package graph didn't return APPMODEL_ERROR_NO_PACKAGE. Expanded tests
@DrusTheAxe DrusTheAxe added the area-DynamicDependencies DynamicDependency for Windows App SDK: enables framework packages for packaged & unpackaged apps label Mar 19, 2021
@DrusTheAxe DrusTheAxe added this to the 0.8 (2021 Q2) milestone Mar 19, 2021
@DrusTheAxe DrusTheAxe self-assigned this Mar 19, 2021
@ghost ghost added the needs-triage label Mar 19, 2021
@DrusTheAxe DrusTheAxe changed the title User/drustheaxe/dyndep com getcurrentpackageinfo DynamicDependencies: Only Detour functions in not-packaged processes Mar 19, 2021

#include <../Detours/detours.h>

static bool IsPackagedProcess()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this like the 4th or 5th copy of this we've made?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol 2nd or maybe 3rd. I'm planning to centralize this (and a few other things) but waiting on a couple of naming decisions first.

There's a laundry list of refactoring I've got my eye on. Planning to put some time in after I finish some critical path work.

Comment thread dev/DynamicDependency/PackageGraphManager.cpp
@DrusTheAxe DrusTheAxe merged commit 10609e9 into main Mar 20, 2021
@DrusTheAxe DrusTheAxe deleted the user/drustheaxe/dyndep-com-getcurrentpackageinfo branch March 20, 2021 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-DynamicDependencies DynamicDependency for Windows App SDK: enables framework packages for packaged & unpackaged apps needs-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants