Skip to content

Commit

Permalink
Reapply "Delegate to OS RegFreeWinRT when available (>=24H1) (#4728)" (
Browse files Browse the repository at this point in the history
…#4935) (#4949)

* Reapply "Delegate to OS RegFreeWinRT when available (>=24H1) (#4728)" (#4935)

This reverts commit c088336.

* Added missing dependencies for OAuth2ManagerTests

* Expanded tests

* Modified IsSupported with temporary debugging hack to expedite testing. Added local hackery for Architectures=None (but is it needed?)

* Removed debug hackery

* Test fixes

* More test fiddling

* Microsoft.Windows.BadgeNotifications.Projection project is missing a build-order dependency on WindowsAppRuntime_DLL so depending on timing and beefy machine it can try to build before the dependency is built and boom :-(

* Removed redundant Import

* Fixed bad merge

* Fixed WinAppSDK framework package family name construction in GetFrameworkPackageFamilyName() [MddBootstrap.cpp]. This is used in production when delegating to OS DynDep but not when using WinAppSDK DynDep (and test support used different codepath). That's why test packages with blah-major.minor... package names worked in test and on Win10 but not when delegating to OS DynDep on Win11. Added additional test tools to aid verification and debugging (now and in any future changes).

* Fixed DevCheck -CheckDependencies if packages.config has no <package> elements. Ran DevCheck -SyncDependencies to update stale dependencies

* Fix test framework package Name from name-major.minor to name.major.minor

* Workaround Windows bug https://task.ms/54835001 where IsPackage*ReadyOrNewerAvailable() doesn't correctly handle ProcessorArchitectureFilter=None

* Ran devcheck -syncdependencies

* Fixed failing PackageManagementTests

* Updated dependnecies via DevCheck -SyncDependencies. Removed unused Microsoft.Windows.SDK.BuildTools and Microsoft.WindowsAppSDK references in WindowsAppRuntime_UniversalBGTaskDLL's packages.config. Removed dead readme.txt in WindowsAppRuntime_UniversalBGTaskDLL projectdir (artifact of VS File/NewProject...).

* Updated link to latest SDK rev

* Fixed dependencies (syntax and usage

* Put WindowsAppRuntime_UniversalBGTaskDLL back to what's in main. No idea why that works but changing it -- in what should be innocuous ways -- breaks local + pipeline builds. Deferring that problem to Will Thant in its own right (not relevant to my changes)

* Fixed hardcoded versions in OAuthTestApp.vcxproj (wasn't using version macro)

* Fixed more bad projects - Import Microsoft.Cpp.Default.props not at the top, .. pathing to nugets and hardwired nuget versions

* Fixed WindowsAppRuntime_UniversalBGTaskDLL - Import Microsoft.Cpp.Default.props not at top of file, not using $(NugetPackageDirectory) for pathing to nugets, hardwired versions for nugets, unnecessary Microsoft.WindowsAppSDK in packages.config

* Added -ShowSystemInfo (default=$true) to Testall so test run output includes basic system info

* Fixed up test Main+Singleton+DDLM naming/constants

* Fixed bug in package name constant

* Added missing project dependencies. Updated ConfigurationManager to build test packages on ARM64 too (some were only build for x64|x86)

* Fixed bad merge

* Fixed a bad merge

* Removed temporary debugging code

* Some test packages lacked ARM64 support, plus those and others weren't getting built for ARM64. And some projects built not-ARM64 for ARM64. Mostly fixed. Some test projects lack ARM64 support but not touched as not blocking here and overdue already; they can (and will) be handled in a separate follow up effort

* Fixed one more ARM configuration manager misconfiguration

---------

Co-authored-by: Kyaw Thant <48363984+kythant@users.noreply.github.com>
  • Loading branch information
DrusTheAxe and kythant authored Feb 4, 2025
1 parent 64e32d6 commit 3959f0d
Show file tree
Hide file tree
Showing 141 changed files with 2,469 additions and 353 deletions.
43 changes: 42 additions & 1 deletion TestAll.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ param(
[Switch]$Test,

[Parameter(Mandatory=$false)]
[Switch]$List
[Switch]$List,

[Parameter(Mandatory=$false)]
[Switch]$ShowSystemInfo=$true
)

$StartTime = Get-Date
Expand Down Expand Up @@ -175,6 +178,44 @@ function Run-Tests
}
}

function Get-SystemInfo
{
$regkey = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$productname = $(Get-Item -Path $regkey).GetValue('ProductName')
$displayversion = $(Get-Item -Path $regkey).GetValue('DisplayVersion')
$currentmajor = $(Get-Item -Path $regkey).GetValue('CurrentMajorVersionNumber')
$currentminor = $(Get-Item -Path $regkey).GetValue('CurrentMinorVersionNumber')
$currentbuild = $(Get-Item -Path $regkey).GetValue('CurrentBuild')
Write-Host "Product : $($productname) $($displayversion) $($currentmajor).$($currentminor).$($currentbuild)"

$installationtype = $(Get-Item -Path $regkey).GetValue('InstallationType')
Write-Host "InstallationType: $($installationtype)"

$editionid = $(Get-Item -Path $regkey).GetValue('EditionId')
$compositioneditionid = $(Get-Item -Path $regkey).GetValue('CompositionEditionID')
if ($editionid -eq $compositioneditionid)
{
Write-Host "Edition : $($editionid)"
}
else
{
Write-Host "Edition : $($editionid) [$($compositioneditionid)]"
}

$buildlabex = $(Get-Item -Path $regkey).GetValue('BuildLabEx')
Write-Host "Build : $($buildlabex)"

$lcuver = $(Get-Item -Path $regkey).GetValue('LCUVer')
Write-Host "LCU Version : $($lcuver)"

Write-Host "Powershell : $($PSVersionTable.PSEdition) $($PSVersionTable.PSVersion)"
}

if ($ShowSystemInfo -eq $true)
{
Get-SystemInfo
}

if ($List -eq $true)
{
List-Tests | Out-String
Expand Down
219 changes: 191 additions & 28 deletions WindowsAppRuntime.sln

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
inputs:
targetType: filePath
filePath: tools\DevCheck\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -CheckDependencies -ShowSystemInfo
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -CheckDependencies -CheckVisualStudio -ShowSystemInfo
workingDirectory: '$(Build.SourcesDirectory)'

- task: DownloadPipelineArtifact@2
Expand Down Expand Up @@ -147,6 +147,17 @@ steps:
Write-Host "WhoAmI"
Write-Host (whoami /user /groups /priv)
- task: PowerShell@2
displayName: 'Dump services'
inputs:
targetType: 'inline'
script: |
Get-Service
Get-Service | Write-Host
Get-Service | Out-Host
sc.exe queryex te.service | Write-Host
sc.exe qc te.service | Write-Host
- task: PowerShell@2
displayName: 'Run TAEF Tests'
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ steps:
inputs:
targetType: filePath
filePath: tools\DevCheck\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -CheckDependencies -ShowSystemInfo
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -CheckDependencies -CheckVisualStudio -ShowSystemInfo
workingDirectory: '$(Build.SourcesDirectory)'
- task: PowerShell@2
Expand Down
17 changes: 11 additions & 6 deletions dev/Common/IsWindowsVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,35 @@ inline bool IsExportPresent(

inline bool IsWindows10_19H1OrGreater()
{
// GetPackageInfo2() added to kernelbase.dll in NTDDI_WIN10_19H1 (aka 19H1)
// GetPackageInfo2() added to kernelbase.dll in 19H1 (aka NTDDI_WIN10_19H1)
return IsExportPresent(L"kernelbase.dll", "GetPackageInfo2");
}

inline bool IsWindows10_20H1OrGreater()
{
// GetPackageInfo3() added to kernelbase.dll in NTDDI_WIN10_VB (aka 20H1)
// GetPackageInfo3() added to kernelbase.dll in 20H1 (aka NTDDI_WIN10_VB)
return IsExportPresent(L"kernelbase.dll", "GetPackageInfo3");
}
inline bool IsWindows11_21H2OrGreater()
{
// GetMachineTypeAttributes() added to kernelbase.dll in NTDDI_WIN10_CO (aka Windows 11 21H2)
// GetMachineTypeAttributes() added to kernelbase.dll in Windows 11 21H2 (aka NTDDI_WIN10_CO)
return IsExportPresent(L"kernelbase.dll", "GetMachineTypeAttributes");
}
inline bool IsWindows11_22H2OrGreater()
{
// GetPackageGraphRevisionId() added to kernelbase.dll in NTDDI_WIN10_NI (aka Windows 11 22H2)
// GetPackageGraphRevisionId() added to kernelbase.dll in Windows 11 22H2 (aka NTDDI_WIN10_NI)
return IsExportPresent(L"kernelbase.dll", "GetPackageGraphRevisionId");
}
inline bool IsWindows11_23H1OrGreater()
inline bool IsWindows11_24H1OrGreater()
{
// TryCreatePackageDependency2() added to in NTDDI_WIN10_GE (aka Windows 11 23H1)
// TryCreatePackageDependency2() added to in Windows 11 24H1 (aka NTDDI_WIN11_GE)
return IsExportPresent(L"kernelbase.dll", "TryCreatePackageDependency2");
}
inline bool IsWindows11_24H2OrGreater()
{
// MsixIsPackageFeatureSupported() added to in Windows 11 24H2 (aka NTDDI_WIN11_GE)
return IsExportPresent(L"appxdeploymentclient.dll", "MsixIsPackageFeatureSupported");
}
}

#endif // __ISWINDOWSVERSION_H
49 changes: 37 additions & 12 deletions dev/DynamicDependency/API/MddWin11.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <MsixDynamicDependency.h>

#include <IsWindowsVersion.h>
#include <AppModel.Identity.h>

namespace MddCore::Win11
{
Expand Down Expand Up @@ -41,7 +42,7 @@ namespace MddCore::Win11
__declspec(selectany) HMODULE g_dllApisetAppmodelRuntime_1_7{};
//TODO:47775758 GetResolved2 __declspec(selectany) decltype(&::GetResolvedPackageFullNameForPackageDependency2) g_win11GetResolvedPackageFullNameForPackageDependency2{};

__declspec(selectany) bool g_isSupported{ WindowsVersion::IsWindows11_22H2OrGreater() };
__declspec(selectany) bool g_isSupported{ WindowsVersion::IsWindows11_24H1OrGreater() };

constexpr PackageDependencyLifetimeKind ToLifetimeKind(MddPackageDependencyLifetimeKind lifetimeKind)
{
Expand Down Expand Up @@ -95,18 +96,48 @@ namespace MddCore::Win11

inline bool IsSupported()
{
#if defined(TODO_WindowsAppSDKAggregator_Test_Failures)
return MddCore::Win11::details::g_isSupported;
#else
return false;
#endif
}

inline bool IsGetResolvedPackageFullNameForPackageDependency2Supported()
{
return IsSupported() && MddCore::Win11::details::g_dllApisetAppmodelRuntime_1_7;
}

constexpr PackageDependencyProcessorArchitectures GetPackageDependencyProcessorArchitecturesCompatibleWithCallerArchitecture()
{
#if defined(_M_ARM)
return PackageDependencyProcessorArchitectures_Arm | PackageDependencyProcessorArchitectures_Neutral;
#elif defined(_M_ARM64)
return PackageDependencyProcessorArchitectures_Arm64 | PackageDependencyProcessorArchitectures_Neutral;
#elif defined(_M_IX86)
return PackageDependencyProcessorArchitectures_X86 | PackageDependencyProcessorArchitectures_Neutral;
#elif defined(_M_X64)
return PackageDependencyProcessorArchitectures_X64 | PackageDependencyProcessorArchitectures_Neutral;
#else
# error "Unknown processor architecture"
#endif
}

constexpr PackageDependencyProcessorArchitectures ToPackageDependencyProcessorArchitectures(
const MddPackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures)
{
if (packageDependencyProcessorArchitectures == MddPackageDependencyProcessorArchitectures::None)
{
// Workaround Windows bug (https://task.ms/54835001) that doesn't treat PackageDependencyProcessorArchitectures::None equivalent to caller-architecture + Neutral
return GetPackageDependencyProcessorArchitecturesCompatibleWithCallerArchitecture();
}

auto win11PackageDependencyProcessorArchitectures{ PackageDependencyProcessorArchitectures_None };
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Neutral, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Neutral));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86A64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86OnArm64));
return win11PackageDependencyProcessorArchitectures;
}

inline HRESULT TryCreatePackageDependency(
PSID user,
_In_ PCWSTR packageFamilyName,
Expand All @@ -119,13 +150,7 @@ namespace MddCore::Win11
{
const ::AppModel::Identity::PackageVersion win11MinVersion{ minVersion };

auto win11PackageDependencyProcessorArchitectures{ PackageDependencyProcessorArchitectures_None };
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Neutral, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Neutral));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86A64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86OnArm64));
auto win11PackageDependencyProcessorArchitectures{ ToPackageDependencyProcessorArchitectures(packageDependencyProcessorArchitectures) };

const auto win11LifetimeKind{ MddCore::Win11::details::ToLifetimeKind(lifetimeKind) };

Expand Down
2 changes: 1 addition & 1 deletion dev/MRTCore/mrt/Core/unittests/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.94.240624002" targetFramework="native" />
<package id="Microsoft.Taef" version="10.95.240918004" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.94.240624002" targetFramework="net45" />
<package id="Microsoft.Taef" version="10.95.240918004" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion dev/MRTCore/mrt/mrm/UnitTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240803.1" targetFramework="native" />
<package id="Microsoft.Taef" version="10.94.240624002" targetFramework="native" />
<package id="Microsoft.Taef" version="10.95.240918004" targetFramework="native" />
</packages>
33 changes: 30 additions & 3 deletions dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,34 @@ static PackageManagement_ArchitectureType ToArchitectureType(const winrt::Window
}
}

static constexpr PackageManagement_ArchitectureType GetPackageManagementArchitectureTypesCompatibleWithCallerArchitecture()
{
#if defined(_M_ARM)
return PackageManagement_ArchitectureType_Arm | PackageManagement_ArchitectureType_Neutral;
#elif defined(_M_ARM64)
return PackageManagement_ArchitectureType_Arm64 | PackageManagement_ArchitectureType_Neutral;
#elif defined(_M_IX86)
return PackageManagement_ArchitectureType_X86 | PackageManagement_ArchitectureType_Neutral;
#elif defined(_M_X64)
return PackageManagement_ArchitectureType_X64 | PackageManagement_ArchitectureType_Neutral;
#else
# error "Unknown processor architecture"
#endif
}

namespace winrt::Microsoft::Windows::ApplicationModel::DynamicDependency
{
DEFINE_ENUM_FLAG_OPERATORS(PackageDependencyProcessorArchitectures)
}
static PackageManagement_ArchitectureType ToArchitectureType(const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter)
{
// Workaround bug in Windows https://task.ms/54835001 not handling processor architecture filter = None as "architcture(s) supported by the calling code"
// TODO: Use IsPackageDeploymentFeatureSupported(IsPackageReadyOrNewerAvailable_ProcessorArchitectureFilter_None) when available
if (processorArchitectureFilter == winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::None)
{
return GetPackageManagementArchitectureTypesCompatibleWithCallerArchitecture();
}

auto architectureType{ PackageManagement_ArchitectureType_None };
if (WI_IsFlagSet(processorArchitectureFilter, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral))
{
Expand Down Expand Up @@ -119,9 +141,14 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
case winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentFeature::PackageUriScheme_ms_uup:
{
//TODO Feature lookup
// Relies on PackageManagement_IsFeatureSupported(L"PackageUriScheme.ms-uup") exist in Microsoft.FrameworkUdk and enabled
return ::WindowsVersion::IsExportPresent(L"appxdeploymentclient.dll", "MsixRemovePackageByUriAsync");
BOOL isSupported{};
const HRESULT hr{ PackageManagement_IsFeatureSupported(L"PackageUriScheme.ms-uup", &isSupported) };
if (hr == E_NOTIMPL)
{
return false;
}
THROW_IF_FAILED_MSG(hr, "PackageUriScheme_ms_uup");
return !!isSupported;
}
case winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentFeature::IsPackageReadyOrNewerAvailable:
{
Expand Down
46 changes: 38 additions & 8 deletions dev/UndockedRegFreeWinRT/urfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <activation.h>
#include <VersionHelpers.h>

#include <IsWindowsVersion.h>

#include "urfw.h"

#include "catalog.h"
Expand Down Expand Up @@ -58,18 +60,18 @@ static decltype(RoGetActivationFactory)* TrueRoGetActivationFactory = RoGetActiv
static decltype(RoGetMetaDataFile)* TrueRoGetMetaDataFile = RoGetMetaDataFile;
static decltype(RoResolveNamespace)* TrueRoResolveNamespace = RoResolveNamespace;

static bool g_apisAreDetoured{};

enum class ActivationLocation
{
CurrentApartment,
CrossApartmentMTA
};

VOID CALLBACK EnsureMTAInitializedCallBack
(
VOID CALLBACK EnsureMTAInitializedCallBack(
PTP_CALLBACK_INSTANCE /*instance*/,
PVOID /*parameter*/,
PTP_WORK /*work*/
)
PTP_WORK /*work*/)
{
Microsoft::WRL::ComPtr<IComThreadingInfo> spThreadingInfo;
CoGetObjectContext(IID_PPV_ARGS(&spThreadingInfo));
Expand Down Expand Up @@ -405,10 +407,34 @@ HRESULT ExtRoLoadCatalog()

HRESULT UrfwInitialize() noexcept
{
#if defined(TODO_URFW_DELEGATE_TO_OS_19H1PLUS)
// Windows' Reg-Free WinRT first appeared in Windows 10 Version 1903, May 2019 Update (aka 19H1)
// https://blogs.windows.com/windowsdeveloper/2019/04/30/enhancing-non-packaged-desktop-apps-using-windows-runtime-components/
// Delegate to the OS' implementation when available
if (WindowsVersion::IsWindows10_19H1OrGreater())
{
return S_OK;
}
#elif defined(TODO_SEEME_PRODUCT_TARGET)
// Delegate to the OS' implementation on >= Windows 11 24H1
if (WindowsVersion::IsWindows11_22H2OrGreater())
{
return S_OK;
}
#else
// Delegate to the OS' implementation on >= Windows 11 24H1
if (WindowsVersion::IsWindows11_24H1OrGreater())
{
return S_OK;
}
#endif

// OS Reg-Free WinRT isn't available so let's do it ourselves...
DetourAttach(&(PVOID&)TrueRoActivateInstance, RoActivateInstanceDetour);
DetourAttach(&(PVOID&)TrueRoGetActivationFactory, RoGetActivationFactoryDetour);
DetourAttach(&(PVOID&)TrueRoGetMetaDataFile, RoGetMetaDataFileDetour);
DetourAttach(&(PVOID&)TrueRoResolveNamespace, RoResolveNamespaceDetour);
g_apisAreDetoured = true;
try
{
RETURN_IF_FAILED(ExtRoLoadCatalog());
Expand All @@ -422,10 +448,14 @@ HRESULT UrfwInitialize() noexcept

void UrfwShutdown() noexcept
{
DetourDetach(&(PVOID&)TrueRoActivateInstance, RoActivateInstanceDetour);
DetourDetach(&(PVOID&)TrueRoGetActivationFactory, RoGetActivationFactoryDetour);
DetourDetach(&(PVOID&)TrueRoGetMetaDataFile, RoGetMetaDataFileDetour);
DetourDetach(&(PVOID&)TrueRoResolveNamespace, RoResolveNamespaceDetour);
if (g_apisAreDetoured)
{
DetourDetach(&(PVOID&)TrueRoActivateInstance, RoActivateInstanceDetour);
DetourDetach(&(PVOID&)TrueRoGetActivationFactory, RoGetActivationFactoryDetour);
DetourDetach(&(PVOID&)TrueRoGetMetaDataFile, RoGetMetaDataFileDetour);
DetourDetach(&(PVOID&)TrueRoResolveNamespace, RoResolveNamespaceDetour);
g_apisAreDetoured = false;
}
}

extern "C" void WINAPI winrtact_Initialize()
Expand Down
Loading

0 comments on commit 3959f0d

Please sign in to comment.