DynamicDependencies: Only Detour functions in not-packaged processes#620
Merged
DrusTheAxe merged 3 commits intomainfrom Mar 20, 2021
Merged
Conversation
…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
aeloros
approved these changes
Mar 19, 2021
|
|
||
| #include <../Detours/detours.h> | ||
|
|
||
| static bool IsPackagedProcess() |
Contributor
There was a problem hiding this comment.
Isn't this like the 4th or 5th copy of this we've made?
Member
Author
There was a problem hiding this comment.
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.
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.
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