mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[Refactor]Port C++/CX to C++/WinRT (#34198)
## Summary of the Pull Request Removes all C++/CX code, replacing it with C++/WinRT. ## Detailed Description of the Pull Request / Additional comments Removes all C++/CX code. Renames interop namespaces to be better consumed by CsWinRT. Standardizes all projects on net8.0-windows10.0.20348.0, which is a requirement for C++/WinRT usage. FileLocksmithLibInterop brought to stdcpplatest and static analysis errors were corrected. Removed now unneeded string conversion code from FileLocksmithLibInterop. Changed interop KeyboardHook to use a single hook across all instances. Required because on C++/WinRT we don't have the .NET runtime to bind a object instance to a delegate and be able to pass it to a C function pointer argument (still no idea why this worked correctly on C++/CX to be honest). This change actually makes us create less low level keyboard hooks. Changed some code that depended on arrays since WinRT/C++ returns null instead of an empty array through the interface. ## Validation Steps Performed Built and tested runtime.
This commit is contained in:
@@ -25,11 +25,9 @@
|
||||
<?if $(sys.BUILDARCH) = x64 ?>
|
||||
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140_1_app.dll" />
|
||||
<?endif ?>
|
||||
<!-- Latest CppWinRT upgrade made Keyboard Manager Editor depend on additional VC Runtime libraries. -->
|
||||
<!-- These are not in the Keyboard Manager Editor build output. So we copy them from the base build directory. -->
|
||||
<File Source="$(var.BinDir)vcruntime140.dll" />
|
||||
<File Source="$(var.BinDir)vcruntime140_1.dll" />
|
||||
<File Source="$(var.BinDir)msvcp140.dll" />
|
||||
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140.dll" />
|
||||
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140_1.dll" />
|
||||
<File Source="$(var.BinDir)KeyboardManagerEditor\msvcp140.dll" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user