зеркало из
1
0
Форкнуть 0
MSIX-PackageSupportFramework/PsfRunDll
npuvvada 57ac292c58
Merge Develop into master branch (#203)
-Environmental variable Fixup
-RegLegacy fixup type 'Fake Delete'
-'WaitForDeugger' field to debug PSF launcher for debug builds.
-Other bug fixes
2022-09-13 19:58:51 +05:30
..
PsfRunDll.vcxproj Merge Develop into master branch (#203) 2022-09-13 19:58:51 +05:30
PsfRunDll.vcxproj.filters Breaking Change: Renaming fraemwork to align with functionality 2018-09-25 14:39:02 -07:00
main.cpp removed exception structure in favor throw at the point of the exception. 2019-07-18 15:08:21 -07:00
readme.md Breaking Change: Renaming fraemwork to align with functionality 2018-09-25 14:39:02 -07:00

readme.md

PsfRunDll

The Detours library leverages the system executable rundll32.exe when performing cross architecture launches. That is, if a 64-bit application attempts to launch a 32-bit application (or vice-versa), then Detours will invoke the 32-bit version of rundll32 to perform the patch up work inside of the target process that it would have otherwise performed itself. It does so because the size of some of the structures that it is modifying in the target process is architecture dependent.

This poses an issue for us, however. The Desktop Bridge has a notion of "break away" where processes whose executables located outside of the pacakge will run without the package identity or any restrictions/redirections that would otherwise exist for Desktop Bridge applications. This is problematic since part of this process requires that rundll32 load PsfRuntimeXX.dll to perform this patch-up work, but rundll32 won't have execute permissions on the dll since it would be running outside of the context of the package.

To work around this, PsfRunDllXX.exe is provided to act as a minimal replacement for the system provided rundll32 executable. The fixup for CreateProcess will redirect attempts to launch rundll32 by Detours to instead launch PsfRunDllXX.exe.