Merge pull request #60 from Rodrigo-Todescatto/main

Added some ICoreApplication basic stuff.
This commit is contained in:
Tyler Jaacks
2024-10-13 20:30:54 -05:00
committed by GitHub
6 changed files with 490 additions and 236 deletions

View File

@@ -0,0 +1,103 @@
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppFunctionResultShouldBeUsed
// ReSharper disable CppParameterMayBeConst
#include "pch.h"
#include "CoreApplicationX.h"
HRESULT CoreApplicationX::GetIids(ULONG* iidCount, IID** iids)
{
return m_coreWindow->GetIids(iidCount, iids);
}
HRESULT CoreApplicationX::GetRuntimeClassName(HSTRING* className)
{
return m_coreWindow->GetRuntimeClassName(className);
}
HRESULT CoreApplicationX::GetTrustLevel(TrustLevel* trustLevel)
{
return m_coreWindow->GetTrustLevel(trustLevel);
}
INT32 CoreApplicationX::_abi_add_Resuming(__FIEventHandler_1_IInspectable* handler, EventRegistrationToken* token)
{
return m_IapplicationCore->add_Resuming(handler, token);
}
INT32 CoreApplicationX::_abi_remove_Resuming(EventRegistrationToken token)
{
return m_IapplicationCore->remove_Resuming(token);
}
INT32 CoreApplicationX::_abi_add_Suspending(__FIEventHandler_1_Windows__CApplicationModel__CSuspendingEventArgs* handler, EventRegistrationToken* token)
{
return m_IapplicationCore->add_Suspending(handler, token);
}
INT32 CoreApplicationX::_abi_remove_Suspending(EventRegistrationToken token)
{
return m_IapplicationCore->remove_Suspending(token);
}
INT32 CoreApplicationX::_abi_get_ResourceAvailability()
{
//Stubbed at this moment.
return 0;
}
INT32 CoreApplicationX::_abi_add_ResourceAvailabilityChanged(winrt::Windows::Foundation::EventHandler<IInspectable>* handler, EventRegistrationToken* token)
{
//Stubbed at this moment.
return 0;
}
INT32 CoreApplicationX::_abi_remove_ResourceAvailabilityChanged(EventRegistrationToken token)
{
//Stubbed at this moment.
return 0;
}
INT32 CoreApplicationX::_abi_RunWithActivationFactories(ABI::Windows::Foundation::IGetActivationFactory* activationFactoryCallback)
{
return m_IapplicationCore->RunWithActivationFactories(activationFactoryCallback);
}
INT32 CoreApplicationX::_abi_GetCurrentView(ABI::Windows::ApplicationModel::Core::ICoreApplicationView** value)
{
return m_IapplicationCore->GetCurrentView(value);
}
INT32 CoreApplicationX::_abi_Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource)
{
return m_IapplicationCore->Run(viewSource);
}
INT32 CoreApplicationX::Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource)
{
return m_IapplicationCore->Run(viewSource);
}
INT32 CoreApplicationX::_abi_get_Id(HSTRING* value)
{
return m_IapplicationCore->get_Id(value);
}
INT32 CoreApplicationX::_abi_get_Properties(ABI::Windows::Foundation::Collections::IPropertySet** value)
{
return m_IapplicationCore->get_Properties(value);
}
HRESULT CoreApplicationX::QueryInterface(const IID& riid, void** ppvObject)
{
return m_coreWindow->QueryInterface(riid, ppvObject);
}
ULONG CoreApplicationX::AddRef()
{
return m_coreWindow->AddRef();
}
ULONG CoreApplicationX::Release()
{
return m_coreWindow->Release();
}

View File

@@ -0,0 +1,47 @@
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppClassCanBeFinal
// ReSharper disable CppPolymorphicClassWithNonVirtualPublicDestructor
// ReSharper disable CppClangTidyClangDiagnosticNonVirtualDtor
#pragma once
#include "ICoreApplicationX.h"
class CoreApplicationX : public ICoreApplicationX
{
public:
CoreApplicationX(winrt::Windows::ApplicationModel::Core::CoreApplication* application)
{
m_applicationCore = reinterpret_cast<winrt::Windows::ApplicationModel::Core::CoreApplication*>(application);
m_IapplicationCore = reinterpret_cast<ABI::Windows::ApplicationModel::Core::ICoreApplication*>(application);
m_coreWindow = reinterpret_cast<ABI::Windows::UI::Core::ICoreWindow*>(application);
}
public:
HRESULT GetIids(ULONG* iidCount, IID** iids) override;
HRESULT GetRuntimeClassName(HSTRING* className) override;
HRESULT GetTrustLevel(TrustLevel* trustLevel) override;
INT32 _abi_add_Resuming(__FIEventHandler_1_IInspectable* handler, EventRegistrationToken* token) override;
INT32 _abi_remove_Resuming(EventRegistrationToken token) override;
INT32 _abi_add_Suspending(__FIEventHandler_1_Windows__CApplicationModel__CSuspendingEventArgs* handler, EventRegistrationToken* token) override;
INT32 _abi_remove_Suspending(EventRegistrationToken token) override;
INT32 _abi_get_ResourceAvailability() override;
INT32 _abi_add_ResourceAvailabilityChanged(winrt::Windows::Foundation::EventHandler<IInspectable>* handler, EventRegistrationToken* token) override;
INT32 _abi_remove_ResourceAvailabilityChanged(EventRegistrationToken token) override;
INT32 _abi_RunWithActivationFactories(ABI::Windows::Foundation::IGetActivationFactory* activationFactoryCallback) override;
INT32 _abi_GetCurrentView(ABI::Windows::ApplicationModel::Core::ICoreApplicationView** value) override;
INT32 _abi_Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource) override;
INT32 Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource) override;
INT32 _abi_get_Id(HSTRING* value) override;
INT32 _abi_get_Properties(ABI::Windows::Foundation::Collections::IPropertySet** value) override;
HRESULT QueryInterface(const IID& riid, void** ppvObject) override;
ULONG AddRef() override;
ULONG Release() override;
private:
winrt::Windows::ApplicationModel::Core::CoreApplication* m_applicationCore;
ABI::Windows::ApplicationModel::Core::ICoreApplication* m_IapplicationCore;
ABI::Windows::UI::Core::ICoreWindow* m_coreWindow;
};

View File

@@ -0,0 +1,38 @@
// ReSharper disable CppPolymorphicClassWithNonVirtualPublicDestructor
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppClangTidyClangDiagnosticNonVirtualDtor
// ReSharper disable IdentifierTypo
// ReSharper disable CppClangTidyClangDiagnosticHeaderHygiene
#include <winrt/windows.foundation.collections.h>
#include <winrt/Windows.ApplicationModel.h>
#include <windows.ui.core.h>
using namespace ABI::Windows::ApplicationModel::Activation;
using namespace ABI::Windows::ApplicationModel;
using namespace ABI::Windows::Foundation;
using namespace ABI::Windows::ApplicationModel::Core;
using namespace ABI::Windows::System;
class ICoreApplicationX : public IInspectable
{
public:
virtual INT32 _abi_add_Resuming(__FIEventHandler_1_IInspectable* handler, EventRegistrationToken* token) = 0;
virtual INT32 _abi_remove_Resuming(EventRegistrationToken token) = 0;
virtual INT32 _abi_add_Suspending(__FIEventHandler_1_Windows__CApplicationModel__CSuspendingEventArgs* handler, EventRegistrationToken* token) = 0;
virtual INT32 _abi_remove_Suspending(EventRegistrationToken token) = 0;
virtual INT32 _abi_get_ResourceAvailability() = 0;
virtual INT32 _abi_add_ResourceAvailabilityChanged(winrt::Windows::Foundation::EventHandler<IInspectable>* handler, EventRegistrationToken* token) = 0;
virtual INT32 _abi_remove_ResourceAvailabilityChanged(EventRegistrationToken token) = 0;
virtual INT32 _abi_RunWithActivationFactories(ABI::Windows::Foundation::IGetActivationFactory* activationFactoryCallback) = 0;
virtual INT32 _abi_GetCurrentView(ABI::Windows::ApplicationModel::Core::ICoreApplicationView** value) = 0;
virtual INT32 _abi_Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource) = 0;
virtual INT32 Run(ABI::Windows::ApplicationModel::Core::IFrameworkViewSource* viewSource) = 0;
virtual INT32 _abi_get_Id(HSTRING* value) = 0;
virtual INT32 _abi_get_Properties(ABI::Windows::Foundation::Collections::IPropertySet** value) = 0;
virtual HRESULT QueryInterface(const IID& riid, void** ppvObject) override = 0;
virtual ULONG AddRef() override = 0;
virtual ULONG Release() override = 0;
};

View File

@@ -1,86 +1,126 @@
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppParameterMayBeConst
// ReSharper disable CppClangTidyClangDiagnosticMicrosoftCast
// ReSharper disable CppClangTidyClangDiagnosticUndefinedReinterpretCast
// ReSharper disable CppClangTidyClangDiagnosticShadow
// ReSharper disable CppClangTidyClangDiagnosticCastFunctionTypeStrict
// ReSharper disable CppFunctionalStyleCast
// ReSharper disable CppClangTidyClangDiagnosticCastAlign
// ReSharper disable CppClangTidyClangDiagnosticCastQual
// ReSharper disable CppZeroConstantCanBeReplacedWithNullptr
#pragma once
inline bool IsClassName(HSTRING classId, const char* classIdName)
{
const wchar_t* classIdString = WindowsGetStringRawBuffer(classId, nullptr);
std::wstring classIdWString(classIdString);
const std::string classIdStringUTF8(classIdWString.begin(), classIdWString.end());
return (classIdStringUTF8 == classIdName);
}
typedef HRESULT(*DllGetForCurrentThreadFunc) (ICoreWindowStatic*, CoreWindow**);
typedef HRESULT(*DllGetActivationFactoryFunc) (HSTRING, IActivationFactory**);
DllGetForCurrentThreadFunc pDllGetForCurrentThread = nullptr;
DllGetActivationFactoryFunc pDllGetActivationFactory = nullptr;
HRESULT(STDMETHODCALLTYPE* TrueGetForCurrentThread)(ICoreWindowStatic* staticWindow, CoreWindow** window);
HRESULT(WINAPI* TrueRoGetActivationFactory)(HSTRING classId, REFIID iid, void** factory) = RoGetActivationFactory;
inline HRESULT STDMETHODCALLTYPE GetForCurrentThread_Hook(ICoreWindowStatic* paramThis, CoreWindow** window)
{
// ReSharper disable once CppLocalVariableMayBeConst
HRESULT hr = TrueGetForCurrentThread(paramThis, window);
//*reinterpret_cast<void**>(window) = new CoreWindowX(*window);
auto p = *reinterpret_cast<void**>(window);
p = new CoreWindowX(*window);
return hr;
}
inline HRESULT WINAPI RoGetActivationFactory_Hook(HSTRING classId, REFIID iid, void** factory)
{
auto hr = TrueRoGetActivationFactory(classId, iid, factory);
if (FAILED(hr))
{
auto library = LoadPackagedLibrary(L"winrt_x.dll", 0);
if (!library) library = LoadLibraryW(L"winrt_x.dll");
if (!library) return hr;
pDllGetActivationFactory = reinterpret_cast<DllGetActivationFactoryFunc>
(GetProcAddress(library, "DllGetActivationFactory"));
if (!pDllGetActivationFactory)
return hr;
ComPtr<IActivationFactory> _factory;
if (IsClassName(classId, "Windows.UI.Core.CoreWindow"))
{
ComPtr<ICoreWindowStatic> coreWindowStatic;
hr = RoGetActivationFactory(HStringReference(RuntimeClass_Windows_UI_Core_CoreWindow).Get(), IID_PPV_ARGS(&coreWindowStatic));
*reinterpret_cast<void**>(&TrueGetForCurrentThread) = (*reinterpret_cast<void***>(coreWindowStatic.Get()))[6];
DetourAttach(&TrueGetForCurrentThread, GetForCurrentThread_Hook);
}
else
{
hr = pDllGetActivationFactory(classId, _factory.GetAddressOf());
}
if (FAILED(hr)) return hr;
return _factory.CopyTo(iid, factory);
}
return hr;
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppParameterMayBeConst
// ReSharper disable CppClangTidyClangDiagnosticMicrosoftCast
// ReSharper disable CppClangTidyClangDiagnosticUndefinedReinterpretCast
// ReSharper disable CppClangTidyClangDiagnosticShadow
// ReSharper disable CppClangTidyClangDiagnosticCastFunctionTypeStrict
// ReSharper disable CppFunctionalStyleCast
// ReSharper disable CppClangTidyClangDiagnosticCastAlign
// ReSharper disable CppClangTidyClangDiagnosticCastQual
// ReSharper disable CppZeroConstantCanBeReplacedWithNullptr
#pragma once
#include <winrt/Windows.ApplicationModel.h>
#include "CoreApplicationX.h"
inline bool IsClassName(HSTRING classId, const char* classIdName)
{
const wchar_t* classIdString = WindowsGetStringRawBuffer(classId, nullptr);
std::wstring classIdWString(classIdString);
const std::string classIdStringUTF8(classIdWString.begin(), classIdWString.end());
return (classIdStringUTF8 == classIdName);
}
typedef HRESULT(*DllGetForCurrentThreadFunc) (ICoreWindowStatic*, CoreWindow**);
typedef HRESULT(*DllGetForCurrentThreadFunc_App) (ABI::Windows::ApplicationModel::Core::ICoreApplication*, winrt::Windows::ApplicationModel::Core::CoreApplication**);
typedef HRESULT(*DllGetActivationFactoryFunc) (HSTRING, IActivationFactory**);
DllGetForCurrentThreadFunc pDllGetForCurrentThread = nullptr;
DllGetForCurrentThreadFunc_App pDllGetForCurrentThread_App = nullptr;
DllGetActivationFactoryFunc pDllGetActivationFactory = nullptr;
HRESULT(STDMETHODCALLTYPE* TrueGetForCurrentThread_App)(ABI::Windows::ApplicationModel::Core::ICoreApplication* Iapplication,
winrt::Windows::ApplicationModel::Core::CoreApplication** Application);
HRESULT(STDMETHODCALLTYPE* TrueGetForCurrentThread)(ICoreWindowStatic* staticWindow, CoreWindow** window);
HRESULT(WINAPI* TrueRoGetActivationFactory)(HSTRING classId, REFIID iid, void** factory) = RoGetActivationFactory;
inline HRESULT STDMETHODCALLTYPE GetForCurrentThread_Hook(ICoreWindowStatic* paramThis, CoreWindow** window)
{
// ReSharper disable once CppLocalVariableMayBeConst
HRESULT hr = TrueGetForCurrentThread(paramThis, window);
//*reinterpret_cast<void**>(window) = new CoreWindowX(*window);
auto p = *reinterpret_cast<void**>(window);
p = new CoreWindowX(*window);
return hr;
}
inline HRESULT STDMETHODCALLTYPE GetForCurrentThread_Hook_App(ABI::Windows::ApplicationModel::Core::ICoreApplication* paramThis,
winrt::Windows::ApplicationModel::Core::CoreApplication** Application)
{
// ReSharper disable once CppLocalVariableMayBeConst
HRESULT hrApp = TrueGetForCurrentThread_App(paramThis, Application);
//*reinterpret_cast<void**>(Application) = new CoreApplicationX(*Application);
auto pApp = *reinterpret_cast<void**>(Application);
pApp = new CoreApplicationX(*Application);
return hrApp;
}
inline HRESULT WINAPI RoGetActivationFactory_Hook(HSTRING classId, REFIID iid, void** factory)
{
auto hr = TrueRoGetActivationFactory(classId, iid, factory);
if (FAILED(hr))
{
auto library = LoadPackagedLibrary(L"winrt_x.dll", 0);
if (!library) library = LoadLibraryW(L"winrt_x.dll");
if (!library) return hr;
pDllGetActivationFactory = reinterpret_cast<DllGetActivationFactoryFunc>
(GetProcAddress(library, "DllGetActivationFactory"));
if (!pDllGetActivationFactory)
return hr;
ComPtr<IActivationFactory> _factory;
if (IsClassName(classId, "Windows.UI.Core.CoreWindow"))
{
ComPtr<ICoreWindowStatic> coreWindowStatic;
hr = RoGetActivationFactory(HStringReference(RuntimeClass_Windows_UI_Core_CoreWindow).Get(), IID_PPV_ARGS(&coreWindowStatic));
*reinterpret_cast<void**>(&TrueGetForCurrentThread) = (*reinterpret_cast<void***>(coreWindowStatic.Get()))[6];
DetourAttach(&TrueGetForCurrentThread, GetForCurrentThread_Hook);
}
else
{
hr = pDllGetActivationFactory(classId, _factory.GetAddressOf());
}
if (FAILED(hr)) return hr;
return _factory.CopyTo(iid, factory);
if (IsClassName(classId, "Windows.ApplicationModel.Core.CoreApplication"))
{
ComPtr<ABI::Windows::ApplicationModel::Core::ICoreApplication> ICoreApplicationPtr;
hr = RoGetActivationFactory(HStringReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(), IID_PPV_ARGS(&ICoreApplicationPtr));
*reinterpret_cast<void**>(&TrueGetForCurrentThread_App) = (*reinterpret_cast<void***>(ICoreApplicationPtr.Get()))[6];
DetourAttach(&TrueGetForCurrentThread_App, GetForCurrentThread_Hook_App);
}
else
{
hr = pDllGetActivationFactory(classId, _factory.GetAddressOf());
}
if (FAILED(hr)) return hr;
return _factory.CopyTo(iid, factory);
}
return hr;
}

View File

@@ -1,118 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{94127830-3a6c-4861-bbd2-20c0d289802d}</ProjectGuid>
<RootNamespace>kernelx</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(ProjectDir)\..\..\thirdparty\Detours\include</IncludePath>
<LibraryPath>$(LibraryPath);$(ProjectDir)\..\..\thirdparty\Detours\lib.X64;</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(IncludePath);$(SolutionPath)\thirdparty\thirdparty\Detours\includes</IncludePath>
<LibraryPath>$(LibraryPath);$(SolutionPath)\thirdparty\thirdparty\Detours\lib.X64;</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
<AdditionalDependencies>ntdll.lib;detours.lib;runtimeobject.lib;kernel32.lib;Synchronization.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>ntdll.lib;detours.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CoreWindowX.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="hooks.h" />
<ClInclude Include="ICoreWindowX.h" />
<ClInclude Include="kernelx.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="utils.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CoreWindowX.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="kernelx.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Exports.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{94127830-3a6c-4861-bbd2-20c0d289802d}</ProjectGuid>
<RootNamespace>kernelx</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(ProjectDir)\..\..\thirdparty\Detours\include</IncludePath>
<LibraryPath>$(LibraryPath);$(ProjectDir)\..\..\thirdparty\Detours\lib.X64;</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(IncludePath);$(SolutionPath)\thirdparty\thirdparty\Detours\includes</IncludePath>
<LibraryPath>$(LibraryPath);$(SolutionPath)\thirdparty\thirdparty\Detours\lib.X64;</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
<AdditionalDependencies>ntdll.lib;detours.lib;runtimeobject.lib;kernel32.lib;Synchronization.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>ntdll.lib;detours.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CoreApplicationX.h" />
<ClInclude Include="CoreWindowX.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="hooks.h" />
<ClInclude Include="ICoreApplicationX.h" />
<ClInclude Include="ICoreWindowX.h" />
<ClInclude Include="kernelx.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="utils.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CoreApplicationX.cpp" />
<ClCompile Include="CoreWindowX.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="kernelx.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Exports.def" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View File

@@ -1,35 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="kernelx.cpp" />
<ClCompile Include="pch.cpp" />
<ClCompile Include="CoreWindowX.cpp">
<Filter>Windows.UI.Core</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="kernelx.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="ICoreWindowX.h">
<Filter>Windows.UI.Core</Filter>
</ClInclude>
<ClInclude Include="CoreWindowX.h">
<Filter>Windows.UI.Core</Filter>
</ClInclude>
<ClInclude Include="hooks.h" />
<ClInclude Include="utils.h" />
</ItemGroup>
<ItemGroup>
<None Include="Exports.def" />
</ItemGroup>
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{1fd01865-5063-43f8-8e37-2d5b0dd81b88}</UniqueIdentifier>
</Filter>
<Filter Include="Windows.UI.Core">
<UniqueIdentifier>{bb53c96d-38a7-46b6-bfc9-84fc5b33678e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="kernelx.cpp" />
<ClCompile Include="pch.cpp" />
<ClCompile Include="CoreWindowX.cpp">
<Filter>Windows.UI.Core</Filter>
</ClCompile>
<ClCompile Include="CoreApplicationX.cpp">
<Filter>Windows.ApplicationModel.Core</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="kernelx.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="ICoreWindowX.h">
<Filter>Windows.UI.Core</Filter>
</ClInclude>
<ClInclude Include="CoreWindowX.h">
<Filter>Windows.UI.Core</Filter>
</ClInclude>
<ClInclude Include="hooks.h" />
<ClInclude Include="utils.h" />
<ClInclude Include="CoreApplicationX.h">
<Filter>Windows.ApplicationModel.Core</Filter>
</ClInclude>
<ClInclude Include="ICoreApplicationX.h">
<Filter>Windows.ApplicationModel.Core</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Exports.def" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{1fd01865-5063-43f8-8e37-2d5b0dd81b88}</UniqueIdentifier>
</Filter>
<Filter Include="Windows.UI.Core">
<UniqueIdentifier>{bb53c96d-38a7-46b6-bfc9-84fc5b33678e}</UniqueIdentifier>
</Filter>
<Filter Include="Windows.ApplicationModel.Core">
<UniqueIdentifier>{22d419bf-d552-4ab7-a078-94a3d47e5051}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>