From e25504620ee6ea93bde032c183621d05b80c8b2a Mon Sep 17 00:00:00 2001 From: Tyler Jaacks Date: Mon, 9 Sep 2024 18:34:55 -0500 Subject: [PATCH] Added Detours. --- .gitmodules | 3 + WinDurango.sln | 144 +++----- dlls/appmodel/appmodel.vcxproj | 69 ---- dlls/d3d11_x/Exports.def | 3 + dlls/d3d11_x/d3d11_x.cpp | 3 + dlls/d3d11_x/d3d11_x.h | 0 dlls/d3d11_x/d3d11_x.vcxproj | 91 ++--- dlls/d3d11_x/d3d11_x.vcxproj.filters | 42 ++- dlls/d3d11_x/dllmain.cpp | 22 ++ dlls/d3d11_x/framework.h | 5 + dlls/d3d11_x/pch.cpp | 5 + dlls/d3d11_x/pch.h | 13 + dlls/d3d12_x/d3d12_x.vcxproj | 55 --- dlls/etwplus/etwplus.vcxproj | 69 ---- dlls/kernelx/Exports.txt | 521 --------------------------- dlls/kernelx/dllmain.cpp | 105 ++---- dlls/kernelx/kernelx.cpp | 6 - dlls/kernelx/kernelx.vcxproj | 82 +---- dlls/kernelx/pch.h | 18 +- dlls/ntdll/ntdll.vcxproj | 69 ---- dlls/xg_x/xg_x.vcxproj | 67 ---- thirdparty/Detours | 1 + 22 files changed, 235 insertions(+), 1158 deletions(-) create mode 100644 .gitmodules create mode 100644 dlls/d3d11_x/Exports.def create mode 100644 dlls/d3d11_x/d3d11_x.cpp create mode 100644 dlls/d3d11_x/d3d11_x.h create mode 100644 dlls/d3d11_x/dllmain.cpp create mode 100644 dlls/d3d11_x/framework.h create mode 100644 dlls/d3d11_x/pch.cpp create mode 100644 dlls/d3d11_x/pch.h delete mode 100644 dlls/kernelx/Exports.txt create mode 160000 thirdparty/Detours diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5dc51cb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "thirdparty/Detours"] + path = thirdparty/Detours + url = https://github.com/microsoft/Detours.git diff --git a/WinDurango.sln b/WinDurango.sln index 7f824e5..8ba2402 100644 --- a/WinDurango.sln +++ b/WinDurango.sln @@ -3,6 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 17.11.35222.181 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernelx", "dlls\kernelx\kernelx.vcxproj", "{94127830-3A6C-4861-BBD2-20C0D289802D}" + ProjectSection(ProjectDependencies) = postProject + {37489709-8054-4903-9C49-A79846049FC9} = {37489709-8054-4903-9C49-A79846049FC9} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dlls", "dlls", "{A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A}" EndProject @@ -10,8 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d12_x", "dlls\d3d12_x\d3d EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntdll", "dlls\ntdll\ntdll.vcxproj", "{7639E4A9-40B7-4709-864A-72A1879AADED}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11_x", "dlls\d3d11_x\d3d11_x.vcxproj", "{8941C1F2-702A-45BE-88BF-DD90DEFE4334}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "etwplus", "dlls\etwplus\etwplus.vcxproj", "{F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xg_x", "dlls\xg_x\xg_x.vcxproj", "{F58FABA6-C92B-4D45-8F05-51A3430D2625}" @@ -24,130 +25,98 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinDurango", "apps\WinDuran EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "appmodel", "dlls\appmodel\appmodel.vcxproj", "{C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11_x", "dlls\d3d11_x\d3d11_x.vcxproj", "{DD076E76-174E-414F-A47F-01CC84E3FC80}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "thridparty", "thridparty", "{097A8A65-AD91-432A-9AF2-58F588E51597}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detours", "thirdparty\Detours\vc\Detours.vcxproj", "{37489709-8054-4903-9C49-A79846049FC9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + DebugMDd|x64 = DebugMDd|x64 Release|x64 = Release|x64 - Release|x86 = Release|x86 + ReleaseMD|x64 = ReleaseMD|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|ARM64.ActiveCfg = Debug|x64 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|ARM64.Build.0 = Debug|x64 {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|x64.ActiveCfg = Debug|x64 {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|x64.Build.0 = Debug|x64 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|x86.ActiveCfg = Debug|Win32 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Debug|x86.Build.0 = Debug|Win32 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|ARM64.ActiveCfg = Release|x64 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|ARM64.Build.0 = Release|x64 + {94127830-3A6C-4861-BBD2-20C0D289802D}.DebugMDd|x64.ActiveCfg = Debug|x64 + {94127830-3A6C-4861-BBD2-20C0D289802D}.DebugMDd|x64.Build.0 = Debug|x64 {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|x64.ActiveCfg = Release|x64 {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|x64.Build.0 = Release|x64 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|x86.ActiveCfg = Release|Win32 - {94127830-3A6C-4861-BBD2-20C0D289802D}.Release|x86.Build.0 = Release|Win32 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|ARM64.ActiveCfg = Debug|x64 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|ARM64.Build.0 = Debug|x64 + {94127830-3A6C-4861-BBD2-20C0D289802D}.ReleaseMD|x64.ActiveCfg = Release|x64 + {94127830-3A6C-4861-BBD2-20C0D289802D}.ReleaseMD|x64.Build.0 = Release|x64 {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|x64.ActiveCfg = Debug|x64 {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|x64.Build.0 = Debug|x64 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|x86.ActiveCfg = Debug|Win32 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Debug|x86.Build.0 = Debug|Win32 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|ARM64.ActiveCfg = Release|x64 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|ARM64.Build.0 = Release|x64 + {B7848E35-3881-44CC-89B9-C14D32B2BC42}.DebugMDd|x64.ActiveCfg = Debug|x64 + {B7848E35-3881-44CC-89B9-C14D32B2BC42}.DebugMDd|x64.Build.0 = Debug|x64 {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|x64.ActiveCfg = Release|x64 {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|x64.Build.0 = Release|x64 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|x86.ActiveCfg = Release|Win32 - {B7848E35-3881-44CC-89B9-C14D32B2BC42}.Release|x86.Build.0 = Release|Win32 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|ARM64.ActiveCfg = Debug|x64 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|ARM64.Build.0 = Debug|x64 + {B7848E35-3881-44CC-89B9-C14D32B2BC42}.ReleaseMD|x64.ActiveCfg = Release|x64 + {B7848E35-3881-44CC-89B9-C14D32B2BC42}.ReleaseMD|x64.Build.0 = Release|x64 {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|x64.ActiveCfg = Debug|x64 {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|x64.Build.0 = Debug|x64 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|x86.ActiveCfg = Debug|Win32 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Debug|x86.Build.0 = Debug|Win32 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|ARM64.ActiveCfg = Release|x64 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|ARM64.Build.0 = Release|x64 + {7639E4A9-40B7-4709-864A-72A1879AADED}.DebugMDd|x64.ActiveCfg = Debug|x64 + {7639E4A9-40B7-4709-864A-72A1879AADED}.DebugMDd|x64.Build.0 = Debug|x64 {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|x64.ActiveCfg = Release|x64 {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|x64.Build.0 = Release|x64 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|x86.ActiveCfg = Release|Win32 - {7639E4A9-40B7-4709-864A-72A1879AADED}.Release|x86.Build.0 = Release|Win32 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|ARM64.ActiveCfg = Debug|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|ARM64.Build.0 = Debug|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|x64.ActiveCfg = Debug|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|x64.Build.0 = Debug|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|x86.ActiveCfg = Debug|Win32 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Debug|x86.Build.0 = Debug|Win32 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|ARM64.ActiveCfg = Release|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|ARM64.Build.0 = Release|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|x64.ActiveCfg = Release|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|x64.Build.0 = Release|x64 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|x86.ActiveCfg = Release|Win32 - {8941C1F2-702A-45BE-88BF-DD90DEFE4334}.Release|x86.Build.0 = Release|Win32 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|ARM64.ActiveCfg = Debug|x64 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|ARM64.Build.0 = Debug|x64 + {7639E4A9-40B7-4709-864A-72A1879AADED}.ReleaseMD|x64.ActiveCfg = Release|x64 + {7639E4A9-40B7-4709-864A-72A1879AADED}.ReleaseMD|x64.Build.0 = Release|x64 {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|x64.ActiveCfg = Debug|x64 {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|x64.Build.0 = Debug|x64 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|x86.ActiveCfg = Debug|Win32 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Debug|x86.Build.0 = Debug|Win32 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|ARM64.ActiveCfg = Release|x64 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|ARM64.Build.0 = Release|x64 + {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.DebugMDd|x64.ActiveCfg = Debug|x64 + {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.DebugMDd|x64.Build.0 = Debug|x64 {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|x64.ActiveCfg = Release|x64 {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|x64.Build.0 = Release|x64 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|x86.ActiveCfg = Release|Win32 - {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.Release|x86.Build.0 = Release|Win32 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|ARM64.ActiveCfg = Debug|x64 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|ARM64.Build.0 = Debug|x64 + {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.ReleaseMD|x64.ActiveCfg = Release|x64 + {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8}.ReleaseMD|x64.Build.0 = Release|x64 {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|x64.ActiveCfg = Debug|x64 {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|x64.Build.0 = Debug|x64 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|x86.ActiveCfg = Debug|Win32 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Debug|x86.Build.0 = Debug|Win32 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|ARM64.ActiveCfg = Release|x64 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|ARM64.Build.0 = Release|x64 + {F58FABA6-C92B-4D45-8F05-51A3430D2625}.DebugMDd|x64.ActiveCfg = Debug|x64 + {F58FABA6-C92B-4D45-8F05-51A3430D2625}.DebugMDd|x64.Build.0 = Debug|x64 {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|x64.ActiveCfg = Release|x64 {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|x64.Build.0 = Release|x64 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|x86.ActiveCfg = Release|Win32 - {F58FABA6-C92B-4D45-8F05-51A3430D2625}.Release|x86.Build.0 = Release|Win32 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|ARM64.Build.0 = Debug|ARM64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {F58FABA6-C92B-4D45-8F05-51A3430D2625}.ReleaseMD|x64.ActiveCfg = Release|x64 + {F58FABA6-C92B-4D45-8F05-51A3430D2625}.ReleaseMD|x64.Build.0 = Release|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x64.ActiveCfg = Debug|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x64.Build.0 = Debug|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x64.Deploy.0 = Debug|x64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x86.ActiveCfg = Debug|x86 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x86.Build.0 = Debug|x86 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Debug|x86.Deploy.0 = Debug|x86 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|ARM64.ActiveCfg = Release|ARM64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|ARM64.Build.0 = Release|ARM64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|ARM64.Deploy.0 = Release|ARM64 + {C0273DA4-2B16-4A10-B229-6113D4408741}.DebugMDd|x64.ActiveCfg = Debug|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x64.ActiveCfg = Release|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x64.Build.0 = Release|x64 {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x64.Deploy.0 = Release|x64 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x86.ActiveCfg = Release|x86 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x86.Build.0 = Release|x86 - {C0273DA4-2B16-4A10-B229-6113D4408741}.Release|x86.Deploy.0 = Release|x86 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|ARM64.Build.0 = Debug|ARM64 + {C0273DA4-2B16-4A10-B229-6113D4408741}.ReleaseMD|x64.ActiveCfg = Release|x64 {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|x64.ActiveCfg = Debug|x64 {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|x64.Build.0 = Debug|x64 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|x86.ActiveCfg = Debug|x86 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Debug|x86.Build.0 = Debug|x86 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|ARM64.ActiveCfg = Release|ARM64 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|ARM64.Build.0 = Release|ARM64 + {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.DebugMDd|x64.ActiveCfg = Debug|x64 {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|x64.ActiveCfg = Release|x64 {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|x64.Build.0 = Release|x64 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|x86.ActiveCfg = Release|x86 - {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.Release|x86.Build.0 = Release|x86 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|ARM64.ActiveCfg = Debug|x64 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|ARM64.Build.0 = Debug|x64 + {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4}.ReleaseMD|x64.ActiveCfg = Release|x64 {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|x64.ActiveCfg = Debug|x64 {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|x64.Build.0 = Debug|x64 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|x86.ActiveCfg = Debug|Win32 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Debug|x86.Build.0 = Debug|Win32 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|ARM64.ActiveCfg = Release|x64 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|ARM64.Build.0 = Release|x64 + {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.DebugMDd|x64.ActiveCfg = Debug|x64 + {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.DebugMDd|x64.Build.0 = Debug|x64 {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|x64.ActiveCfg = Release|x64 {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|x64.Build.0 = Release|x64 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|x86.ActiveCfg = Release|Win32 - {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.Release|x86.Build.0 = Release|Win32 + {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.ReleaseMD|x64.ActiveCfg = Release|x64 + {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9}.ReleaseMD|x64.Build.0 = Release|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.Debug|x64.ActiveCfg = Debug|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.Debug|x64.Build.0 = Debug|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.DebugMDd|x64.ActiveCfg = Debug|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.DebugMDd|x64.Build.0 = Debug|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.Release|x64.ActiveCfg = Release|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.Release|x64.Build.0 = Release|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.ReleaseMD|x64.ActiveCfg = Release|x64 + {DD076E76-174E-414F-A47F-01CC84E3FC80}.ReleaseMD|x64.Build.0 = Release|x64 + {37489709-8054-4903-9C49-A79846049FC9}.Debug|x64.ActiveCfg = DebugMDd|x64 + {37489709-8054-4903-9C49-A79846049FC9}.Debug|x64.Build.0 = DebugMDd|x64 + {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x64.ActiveCfg = DebugMDd|x64 + {37489709-8054-4903-9C49-A79846049FC9}.DebugMDd|x64.Build.0 = DebugMDd|x64 + {37489709-8054-4903-9C49-A79846049FC9}.Release|x64.ActiveCfg = ReleaseMD|x64 + {37489709-8054-4903-9C49-A79846049FC9}.Release|x64.Build.0 = ReleaseMD|x64 + {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x64.ActiveCfg = ReleaseMD|x64 + {37489709-8054-4903-9C49-A79846049FC9}.ReleaseMD|x64.Build.0 = ReleaseMD|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -156,12 +125,13 @@ Global {94127830-3A6C-4861-BBD2-20C0D289802D} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} {B7848E35-3881-44CC-89B9-C14D32B2BC42} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} {7639E4A9-40B7-4709-864A-72A1879AADED} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} - {8941C1F2-702A-45BE-88BF-DD90DEFE4334} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} {F9420BF5-A0E3-41C4-8EB0-DB81A54CF6D8} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} {F58FABA6-C92B-4D45-8F05-51A3430D2625} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} {C0273DA4-2B16-4A10-B229-6113D4408741} = {240ACC56-C364-4337-B2C1-D607979FBEA3} {41492CBB-4C65-4E00-AC8B-69E89EFC8AC4} = {240ACC56-C364-4337-B2C1-D607979FBEA3} {C4B41A92-2F30-4E8D-8F44-1A82F5C6A7F9} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} + {DD076E76-174E-414F-A47F-01CC84E3FC80} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A} + {37489709-8054-4903-9C49-A79846049FC9} = {097A8A65-AD91-432A-9AF2-58F588E51597} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {19991728-E423-4D8D-9EF8-1311EFB03952} diff --git a/dlls/appmodel/appmodel.vcxproj b/dlls/appmodel/appmodel.vcxproj index ce18688..8bac6ec 100644 --- a/dlls/appmodel/appmodel.vcxproj +++ b/dlls/appmodel/appmodel.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -26,19 +18,6 @@ 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -57,12 +36,6 @@ - - - - - - @@ -73,49 +46,9 @@ appmodel - - appmodel - - - appmodel - appmodel - - - Level3 - true - WIN32;_DEBUG;APPMODEL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - - - - - Level3 - true - true - true - WIN32;NDEBUG;APPMODEL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - - Level3 @@ -164,8 +97,6 @@ Create - Create - Create Create diff --git a/dlls/d3d11_x/Exports.def b/dlls/d3d11_x/Exports.def new file mode 100644 index 0000000..cc1ce47 --- /dev/null +++ b/dlls/d3d11_x/Exports.def @@ -0,0 +1,3 @@ +LIBRARY d3d11_x +EXPORTS + D3D11CreateDevice = d3d11.D3D11CreateDevice @4 \ No newline at end of file diff --git a/dlls/d3d11_x/d3d11_x.cpp b/dlls/d3d11_x/d3d11_x.cpp new file mode 100644 index 0000000..f6c8705 --- /dev/null +++ b/dlls/d3d11_x/d3d11_x.cpp @@ -0,0 +1,3 @@ +#include "pch.h" +#include "framework.h" +#include "d3d11_x.h" \ No newline at end of file diff --git a/dlls/d3d11_x/d3d11_x.h b/dlls/d3d11_x/d3d11_x.h new file mode 100644 index 0000000..e69de29 diff --git a/dlls/d3d11_x/d3d11_x.vcxproj b/dlls/d3d11_x/d3d11_x.vcxproj index 0ee3c93..1c29ff0 100644 --- a/dlls/d3d11_x/d3d11_x.vcxproj +++ b/dlls/d3d11_x/d3d11_x.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -21,24 +13,11 @@ 17.0 Win32Proj - {8941c1f2-702a-45be-88bf-dd90defe4334} + {dd076e76-174e-414f-a47f-01cc84e3fc80} d3d11x 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -57,12 +36,6 @@ - - - - - - @@ -71,51 +44,11 @@ - d3d11x - - - d3d11x - - - d3d11x + d3d11_x - d3d11x + d3d11_x - - - Level3 - true - WIN32;_DEBUG;D3D11X_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - - - - - Level3 - true - true - true - WIN32;NDEBUG;D3D11X_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - - Level3 @@ -129,6 +62,8 @@ Windows true false + d3d11.lib;%(AdditionalDependencies) + Exports.def @@ -148,8 +83,24 @@ true true false + d3d11.lib;%(AdditionalDependencies) + Exports.def + + + + + + + + + + + Create + Create + + diff --git a/dlls/d3d11_x/d3d11_x.vcxproj.filters b/dlls/d3d11_x/d3d11_x.vcxproj.filters index 9cd8510..80d2a28 100644 --- a/dlls/d3d11_x/d3d11_x.vcxproj.filters +++ b/dlls/d3d11_x/d3d11_x.vcxproj.filters @@ -1,2 +1,42 @@  - \ No newline at end of file + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/dlls/d3d11_x/dllmain.cpp b/dlls/d3d11_x/dllmain.cpp new file mode 100644 index 0000000..e008d86 --- /dev/null +++ b/dlls/d3d11_x/dllmain.cpp @@ -0,0 +1,22 @@ +// ReSharper disable CppInconsistentNaming +// ReSharper disable CppParameterMayBeConst +#include "pch.h" + +#include + +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD forwardReason, LPVOID lpvReserved) +{ + constexpr BOOL result = TRUE; + + switch (forwardReason) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + default: + break; + } + + return result; +} \ No newline at end of file diff --git a/dlls/d3d11_x/framework.h b/dlls/d3d11_x/framework.h new file mode 100644 index 0000000..54b83e9 --- /dev/null +++ b/dlls/d3d11_x/framework.h @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files +#include diff --git a/dlls/d3d11_x/pch.cpp b/dlls/d3d11_x/pch.cpp new file mode 100644 index 0000000..64b7eef --- /dev/null +++ b/dlls/d3d11_x/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/dlls/d3d11_x/pch.h b/dlls/d3d11_x/pch.h new file mode 100644 index 0000000..885d5d6 --- /dev/null +++ b/dlls/d3d11_x/pch.h @@ -0,0 +1,13 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here +#include "framework.h" + +#endif //PCH_H diff --git a/dlls/d3d12_x/d3d12_x.vcxproj b/dlls/d3d12_x/d3d12_x.vcxproj index ea0f6bf..ad4a71f 100644 --- a/dlls/d3d12_x/d3d12_x.vcxproj +++ b/dlls/d3d12_x/d3d12_x.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -26,19 +18,6 @@ 10.0 - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - Application true @@ -57,12 +36,6 @@ - - - - - - @@ -70,34 +43,6 @@ - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - Level3 diff --git a/dlls/etwplus/etwplus.vcxproj b/dlls/etwplus/etwplus.vcxproj index 37245d9..0b2d0db 100644 --- a/dlls/etwplus/etwplus.vcxproj +++ b/dlls/etwplus/etwplus.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -37,19 +29,6 @@ 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -68,12 +47,6 @@ - - - - - - @@ -84,51 +57,9 @@ etwplus - - etwplus - - - etwplus - etwplus - - - Level3 - true - WIN32;_DEBUG;ETWPLUS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - Exports.def - - - - - Level3 - true - true - true - WIN32;NDEBUG;ETWPLUS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - Exports.def - - Level3 diff --git a/dlls/kernelx/Exports.txt b/dlls/kernelx/Exports.txt deleted file mode 100644 index dbe89df..0000000 --- a/dlls/kernelx/Exports.txt +++ /dev/null @@ -1,521 +0,0 @@ -Name Ordinal -AcquireSRWLockExclusive 1 -AcquireSRWLockShared 2 -AddVectoredContinueHandler 3 -AddVectoredExceptionHandler 4 -AllocateTitlePhysicalPages 5 -Beep 6 -BindIoCompletionCallback 7 -CallbackMayRunLong 8 -CancelIo 9 -CancelIoEx 10 -CancelSynchronousIo 11 -CancelThreadpoolIo 12 -CancelWaitableTimer 13 -CloseHandle 14 -CloseThreadpool 15 -CloseThreadpoolCleanupGroup 16 -CloseThreadpoolCleanupGroupMembers 17 -CloseThreadpoolIo 18 -CloseThreadpoolTimer 19 -CloseThreadpoolWait 20 -CloseThreadpoolWork 21 -CompareFileTime 22 -CompareStringEx 23 -CompareStringOrdinal 24 -CompareStringW 25 -ConnectNamedPipe 26 -ConvertFiberToThread 27 -ConvertThreadToFiber 28 -ConvertThreadToFiberEx 29 -CopyContext 30 -CopyFile2 31 -CopyMemoryNonTemporal 32 -CreateDirectoryA 33 -CreateDirectoryW 34 -CreateEventA 35 -CreateEventExA 36 -CreateEventExW 37 -CreateEventW 38 -CreateFiber 39 -CreateFiberEx 40 -CreateFile2 41 -CreateFileA 42 -CreateFileMappingW 43 -CreateFileW 44 -CreateIoCompletionPort 45 -CreateMutexA 46 -CreateMutexExA 47 -CreateMutexExW 48 -CreateMutexW 49 -CreateNamedPipeW 50 -CreatePipe 51 -CreateProcessA 52 -CreateProcessW 53 -CreateRemoteThread 54 -CreateRemoteThreadEx 55 -CreateSemaphoreA 56 -CreateSemaphoreExA 57 -CreateSemaphoreExW 58 -CreateSemaphoreW 59 -CreateThread 60 -CreateThreadpool 61 -CreateThreadpoolCleanupGroup 62 -CreateThreadpoolIo 63 -CreateThreadpoolTimer 64 -CreateThreadpoolWait 65 -CreateThreadpoolWork 66 -CreateWaitableTimerA 67 -CreateWaitableTimerExA 68 -CreateWaitableTimerExW 69 -CreateWaitableTimerW 70 -DebugBreak 71 -DecodePointer 72 -DecodeSystemPointer 73 -DeleteCriticalSection 74 -DeleteFiber 75 -DeleteFileA 76 -DeleteFileW 77 -DeleteProcThreadAttributeList 78 -DeleteSynchronizationBarrier 79 -DeviceIoControl 80 -DisableThreadLibraryCalls 81 -DisassociateCurrentThreadFromCallback 82 -DisconnectNamedPipe 83 -DuplicateHandle 84 -EncodePointer 85 -EncodeSystemPointer 86 -EnterCriticalSection 87 -EnterSynchronizationBarrier 88 -EnumSystemLocalesA 89 -EnumSystemLocalesEx 90 -EnumSystemLocalesW 91 -EventActivityIdControl 92 -EventEnabled 93 -EventProviderEnabled 94 -EventRegister 95 -EventSetInformation 96 -EventUnregister 97 -EventWrite 98 -EventWriteEx 99 -EventWriteString 100 -EventWriteTransfer 101 -ExitProcess 102 -ExitThread 103 -ExpandEnvironmentStringsW 104 -FatalAppExitA 105 -FileTimeToLocalFileTime 106 -FileTimeToSystemTime 107 -FillMemoryNonTemporal 108 -FindClose 109 -FindFirstFileA 110 -FindFirstFileExA 111 -FindFirstFileExW 112 -FindFirstFileW 113 -FindNLSString 114 -FindNLSStringEx 115 -FindNextFileA 116 -FindNextFileW 117 -FindResourceExW 118 -FindStringOrdinal 119 -FlsAlloc 120 -FlsFree 121 -FlsGetValue 122 -FlsSetValue 123 -FlushFileBuffers 124 -FlushProcessWriteBuffers 125 -FoldStringW 126 -FormatMessageW 127 -FreeEnvironmentStringsW 128 -FreeLibrary 129 -FreeLibraryAndExitThread 130 -FreeLibraryWhenCallbackReturns 131 -FreeTitlePhysicalPages 132 -GetACP 133 -GetCPInfo 134 -GetCommandLineA 135 -GetCommandLineW 136 -GetComputerNameExW 137 -GetConsoleCP 138 -GetConsoleMode 139 -GetConsoleType 140 -GetCurrencyFormatEx 141 -GetCurrentDirectoryA 142 -GetCurrentDirectoryW 143 -GetCurrentProcess 144 -GetCurrentProcessId 145 -GetCurrentProcessorNumber 146 -GetCurrentProcessorNumberEx 147 -GetCurrentThread 148 -GetCurrentThreadId 149 -GetCurrentThreadStackLimits 150 -GetDateFormatA 151 -GetDateFormatEx 152 -GetDateFormatW 153 -GetDiskFreeSpaceExW 154 -GetDiskFreeSpaceW 155 -GetDriveTypeA 156 -GetDriveTypeW 157 -GetDynamicTimeZoneInformation 158 -GetEnabledXStateFeatures 159 -GetEnvironmentStringsW 160 -GetEnvironmentVariableW 161 -GetExitCodeProcess 162 -GetExitCodeThread 163 -GetFileAttributesA 164 -GetFileAttributesExA 165 -GetFileAttributesExW 166 -GetFileAttributesW 167 -GetFileInformationByHandle 168 -GetFileInformationByHandleEx 169 -GetFileSize 170 -GetFileSizeEx 171 -GetFileTime 172 -GetFileType 173 -GetFullPathNameA 174 -GetFullPathNameW 175 -GetGeoInfoW 176 -GetHandleInformation 177 -GetLastError 178 -GetLocalTime 179 -GetLocaleInfoA 180 -GetLocaleInfoEx 181 -GetLocaleInfoW 182 -GetLogicalDrives 183 -GetModuleFileNameA 184 -GetModuleFileNameW 185 -GetModuleHandleA 186 -GetModuleHandleExA 187 -GetModuleHandleExW 188 -GetModuleHandleW 189 -GetNativeSystemInfo 190 -GetNumberFormatEx 191 -GetNumberOfConsoleInputEvents 192 -GetOEMCP 193 -GetOverlappedResult 194 -GetOverlappedResultEx 195 -GetProcAddress 196 -GetProcessAffinityMask 197 -GetProcessHandleCount 198 -GetProcessHeap 199 -GetProcessHeaps 200 -GetProcessId 201 -GetProcessIdOfThread 202 -GetProcessPriorityBoost 203 -GetProcessTimes 204 -GetProcessWorkingSetSize 205 -GetQueuedCompletionStatus 206 -GetQueuedCompletionStatusEx 207 -GetStartupInfoW 208 -GetStdHandle 209 -GetStringTypeExW 210 -GetStringTypeW 211 -GetSystemDirectoryW 212 -GetSystemFileCacheSize 213 -GetSystemInfo 214 -GetSystemOSVersion 215 -GetSystemTime 216 -GetSystemTimeAdjustment 217 -GetSystemTimeAsFileTime 218 -GetSystemTimePreciseAsFileTime 219 -GetSystemWindowsDirectoryW 220 -GetTempPathW 221 -GetThreadContext 222 -GetThreadGroupAffinity 223 -GetThreadId 224 -GetThreadIdealProcessorEx 225 -GetThreadLocale 226 -GetThreadName 227 -GetThreadPriority 228 -GetThreadPriorityBoost 229 -GetThreadTimes 230 -GetTickCount 231 -GetTickCount64 232 -GetTimeFormatA 233 -GetTimeFormatEx 234 -GetTimeFormatW 235 -GetTimeZoneInformation 236 -GetTimeZoneInformationForYear 237 -GetTraceEnableFlags 238 -GetTraceEnableLevel 239 -GetTraceLoggerHandle 240 -GetUserDefaultLCID 241 -GetUserDefaultLocaleName 242 -GetUserGeoID 243 -GetVersion 244 -GetVersionExW 245 -GetVolumeInformationByHandleW 246 -GetVolumeInformationW 247 -GetVolumePathNameW 248 -GetWindowsDirectoryW 249 -GetXStateFeaturesMask 250 -GlobalMemoryStatusEx 251 -HeapAlloc 252 -HeapCompact 253 -HeapCreate 254 -HeapDestroy 255 -HeapFree 256 -HeapLock 257 -HeapQueryInformation 258 -HeapReAlloc 259 -HeapSetInformation 260 -HeapSize 261 -HeapUnlock 262 -HeapValidate 263 -HeapWalk 264 -InitOnceBeginInitialize 265 -InitOnceComplete 266 -InitOnceExecuteOnce 267 -InitOnceInitialize 268 -InitializeConditionVariable 269 -InitializeContext 270 -InitializeCriticalSection 271 -InitializeCriticalSectionAndSpinCount 272 -InitializeCriticalSectionEx 273 -InitializeProcThreadAttributeList 274 -InitializeSListHead 275 -InitializeSRWLock 276 -InitializeSynchronizationBarrier 277 -InterlockedFlushSList 278 -InterlockedPopEntrySList 279 -InterlockedPushEntrySList 280 -InterlockedPushListSList 281 -InterlockedPushListSListEx 282 -IsDebuggerPresent 283 -IsProcessorFeaturePresent 284 -IsThreadAFiber 285 -IsThreadpoolTimerSet 286 -IsValidCodePage 287 -IsValidLocale 288 -IsValidLocaleName 289 -JobTitleMemoryStatus 290 -LCMapStringEx 291 -LCMapStringW 292 -LeaveCriticalSection 293 -LeaveCriticalSectionWhenCallbackReturns 294 -LoadLibraryExA 295 -LoadLibraryExW 296 -LoadLibraryW 297 -LoadPackagedLibrary 298 -LoadResource 299 -LoadStringW 300 -LocalAlloc 301 -LocalFileTimeToFileTime 302 -LocalFree 303 -LocaleNameToLCID 304 -LocateXStateFeature 305 -LockFile 306 -LockFileEx 307 -LockResource 308 -MapTitlePhysicalPages 309 -MapViewOfFileEx 310 -MoveFileExW 311 -MulDiv 312 -MultiByteToWideChar 313 -NlsUpdateLocale 314 -OpenEventA 315 -OpenEventW 316 -OpenFileMappingW 317 -OpenJobObjectW 318 -OpenMutexA 319 -OpenMutexW 320 -OpenProcess 321 -OpenSemaphoreA 322 -OpenSemaphoreW 323 -OpenThread 324 -OpenWaitableTimerA 325 -OpenWaitableTimerW 326 -OutputDebugStringA 327 -OutputDebugStringW 328 -PeekConsoleInputA 329 -PeekNamedPipe 330 -PostQueuedCompletionStatus 331 -QueryDepthSList 332 -QueryPerformanceCounter 333 -QueryPerformanceFrequency 334 -QueryProcessorSchedulingStatistics 335 -QueryThreadpoolStackInformation 336 -QueueUserAPC 337 -QueueUserWorkItem 338 -RaiseException 339 -RaiseFailFastException 340 -ReadConsoleInputA 341 -ReadConsoleInputW 342 -ReadConsoleW 343 -ReadFile 344 -ReadFileEx 345 -ReadFileScatter 346 -ReadProcessMemory 347 -RegCloseKey 348 -RegCreateKeyExW 349 -RegCreateKeyW 350 -RegDeleteKeyExW 351 -RegDeleteKeyW 352 -RegDeleteValueW 353 -RegEnumKeyExW 354 -RegEnumKeyW 355 -RegEnumValueW 356 -RegOpenKeyExW 357 -RegOpenKeyW 358 -RegQueryInfoKeyW 359 -RegQueryValueExW 360 -RegSetValueExW 361 -RegisterTraceGuidsW 362 -RegisterWaitForSingleObject 363 -ReleaseMutex 364 -ReleaseMutexWhenCallbackReturns 365 -ReleaseSRWLockExclusive 366 -ReleaseSRWLockShared 367 -ReleaseSemaphore 368 -ReleaseSemaphoreWhenCallbackReturns 369 -RemoveDirectoryA 370 -RemoveDirectoryW 371 -RemoveVectoredContinueHandler 372 -RemoveVectoredExceptionHandler 373 -ResetEvent 374 -ResolveLocaleName 375 -RestoreLastError 376 -ResumeThread 377 -RtlCaptureContext 378 -RtlCaptureStackBackTrace 379 -RtlLookupFunctionEntry 380 -RtlPcToFileHeader 381 -RtlRaiseException 382 -RtlRestoreContext 383 -RtlUnwind 384 -RtlUnwindEx 385 -RtlVirtualUnwind 386 -SearchPathW 387 -SetConsoleCtrlHandler 388 -SetConsoleMode 389 -SetCriticalSectionSpinCount 390 -SetCurrentDirectoryA 391 -SetCurrentDirectoryW 392 -SetDynamicTimeZoneInformation 393 -SetEndOfFile 394 -SetEnvironmentStringsW 395 -SetEnvironmentVariableA 396 -SetEnvironmentVariableW 397 -SetErrorMode 398 -SetEvent 399 -SetEventWhenCallbackReturns 400 -SetFileAttributesA 401 -SetFileAttributesW 402 -SetFileInformationByHandle 403 -SetFilePointer 404 -SetFilePointerEx 405 -SetFileTime 406 -SetFileValidData 407 -SetHandleInformation 408 -SetLastError 409 -SetLocalTime 410 -SetNamedPipeHandleState 411 -SetProcessAffinityMask 412 -SetProcessPriorityBoost 413 -SetProcessWorkingSetSize 414 -SetStdHandle 415 -SetStdHandleEx 416 -SetSystemFileCacheSize 417 -SetThreadAffinityMask 418 -SetThreadContext 419 -SetThreadGroupAffinity 420 -SetThreadIdealProcessorEx 421 -SetThreadLocale 422 -SetThreadName 423 -SetThreadPriority 424 -SetThreadPriorityBoost 425 -SetThreadStackGuarantee 426 -SetThreadpoolAffinityMask 427 -SetThreadpoolStackInformation 428 -SetThreadpoolThreadMaximum 429 -SetThreadpoolThreadMinimum 430 -SetThreadpoolTimer 431 -SetThreadpoolWait 432 -SetUnhandledExceptionFilter 433 -SetUserGeoID 434 -SetWaitableTimer 435 -SetWaitableTimerEx 436 -SetXStateFeaturesMask 437 -SignalObjectAndWait 438 -SizeofResource 439 -Sleep 440 -SleepConditionVariableCS 441 -SleepConditionVariableSRW 442 -SleepEx 443 -StartThreadpoolIo 444 -SubmitThreadpoolWork 445 -SuspendThread 446 -SwitchToFiber 447 -SwitchToThread 448 -SystemTimeToFileTime 449 -SystemTimeToTzSpecificLocalTime 450 -TerminateProcess 451 -TerminateThread 452 -TitleMemoryStatus 453 -TlsAlloc 454 -TlsFree 455 -TlsGetValue 456 -TlsSetValue 457 -ToolingMemoryStatus 458 -TraceEvent 459 -TraceMessage 460 -TraceMessageVa 461 -TryAcquireSRWLockExclusive 462 -TryAcquireSRWLockShared 463 -TryEnterCriticalSection 464 -TrySubmitThreadpoolCallback 465 -TzSpecificLocalTimeToSystemTime 466 -UnhandledExceptionFilter 467 -UnlockFile 468 -UnlockFileEx 469 -UnmapViewOfFile 470 -UnregisterTraceGuids 471 -UnregisterWaitEx 472 -UpdateProcThreadAttribute 473 -VirtualAlloc 474 -VirtualAllocEx 475 -VirtualFree 476 -VirtualFreeEx 477 -VirtualProtect 478 -VirtualProtectEx 479 -VirtualQuery 480 -VirtualQueryEx 481 -WaitForMultipleObjects 482 -WaitForMultipleObjectsEx 483 -WaitForSingleObject 484 -WaitForSingleObjectEx 485 -WaitForThreadpoolIoCallbacks 486 -WaitForThreadpoolTimerCallbacks 487 -WaitForThreadpoolWaitCallbacks 488 -WaitForThreadpoolWorkCallbacks 489 -WaitNamedPipeW 490 -WaitOnAddress 491 -WakeAllConditionVariable 492 -WakeByAddressAll 493 -WakeByAddressSingle 494 -WakeConditionVariable 495 -WerRegisterFile 496 -WerUnregisterFile 497 -WideCharToMultiByte 498 -WriteConsoleW 499 -WriteFile 500 -WriteFileEx 501 -WriteFileGather 502 -WriteProcessMemory 503 -XMemAlloc 504 -XMemAllocDefault 505 -XMemCheckDefaultHeaps 506 -XMemFree 507 -XMemFreeDefault 508 -XMemGetAllocationHysteresis 509 -XMemGetAllocationStatistics 510 -XMemGetAuxiliaryTitleMemory 511 -XMemPreallocateFreeSpace 512 -XMemReleaseAuxiliaryTitleMemory 513 -XMemSetAllocationHooks 514 -XMemSetAllocationHysteresis 515 -lstrcmpA 516 -lstrcmpW 517 -lstrcmpiA 518 -lstrcmpiW 519 -DllEntryPoint [main entry] \ No newline at end of file diff --git a/dlls/kernelx/dllmain.cpp b/dlls/kernelx/dllmain.cpp index f77351e..aefd0c0 100644 --- a/dlls/kernelx/dllmain.cpp +++ b/dlls/kernelx/dllmain.cpp @@ -1,74 +1,49 @@ +// ReSharper disable CppInconsistentNaming +// ReSharper disable CppParameterMayBeConst +// ReSharper disable CppClangTidyClangDiagnosticMicrosoftCast +// ReSharper disable CppClangTidyClangDiagnosticUndefinedReinterpretCast #include "pch.h" -#include "kernelx.h" -#include -ANSI_STRING* DestinationString; -SYSTEM_BASIC_INFORMATION* System_Info; +typedef HRESULT (WINAPI* FuncRoGetActivationFactory)(HSTRING, REFIID, void**); -HINSTANCE hModule; +FuncRoGetActivationFactory pRoGetActivationFactory = RoGetActivationFactory; -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD forwardReason, LPVOID lpvReserved) +HRESULT WINAPI RoGetActivationFactory_Hook(HSTRING classId, REFIID iid, void** factory) { - BOOL result = TRUE; // Default to TRUE for all cases - switch (forwardReason) + const wchar_t* classIdStr = WindowsGetStringRawBuffer(classId, nullptr); + + if (wcscmp(classIdStr, L"Windows.ApplicationModel.Core.CoreApplication") == 0) { - case DLL_PROCESS_ATTACH: - // Allocate and initialize the global pointers - DestinationString = (ANSI_STRING*)malloc(sizeof(ANSI_STRING)); - if (!DestinationString) { - return FALSE; // Fail if memory allocation fails - } - System_Info = (SYSTEM_BASIC_INFORMATION*)malloc(sizeof(SYSTEM_BASIC_INFORMATION)); - if (!System_Info) { - free(DestinationString); // Clean up previously allocated memory - return FALSE; - } - - if (NtQuerySystemInformation(SystemBasicInformation, System_Info, sizeof(SYSTEM_BASIC_INFORMATION), NULL) < 0) { - free(DestinationString); // Clean up - free(System_Info); - return FALSE; // Fail if system info can't be obtained - } - - DestinationString->Buffer = (char*)malloc(1024); // Allocate buffer for ANSI string - if (!DestinationString->Buffer) { - free(DestinationString); // Clean up - free(System_Info); - return FALSE; - } - DestinationString->Length = 0; - DestinationString->MaximumLength = 1024; - - if (RtlUnicodeStringToAnsiString(DestinationString, &NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->CommandLine, FALSE) < 0) { - free(DestinationString->Buffer); // Clean up - free(DestinationString); - free(System_Info); - return FALSE; - } - - // Set exception handler - SetUnhandledExceptionFilter(UnhandledExceptionFilter); - hModule = hInstance; - sub_18001BB8C(); - break; - - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - // Perform cleanup on process detach - if (forwardReason == DLL_PROCESS_DETACH) { - if (DestinationString) { - if (DestinationString->Buffer) - free(DestinationString->Buffer); - free(DestinationString); - } - if (System_Info) { - free(System_Info); - } - } - result = sub_18001BCA0(hInstance, forwardReason, lpvReserved); - break; + MessageBox(nullptr, L"RoGetActivationFactory", L"classId: Windows.ApplicationModel.Core.CoreApplication", MB_OK); } - return result; + return S_OK; +} + +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID reserved) +{ + if (DetourIsHelperProcess()) return TRUE; + + if (dwReason == DLL_PROCESS_ATTACH) + { + DetourRestoreAfterWith(); + + DetourTransactionBegin(); + DetourUpdateThread(GetCurrentThread()); + + DetourAttach(&reinterpret_cast(pRoGetActivationFactory), RoGetActivationFactory_Hook); + + DetourTransactionCommit(); + } + else if (dwReason == DLL_PROCESS_DETACH) + { + DetourTransactionBegin(); + DetourUpdateThread(GetCurrentThread()); + + DetourDetach(&reinterpret_cast(pRoGetActivationFactory), RoGetActivationFactory_Hook); + + DetourTransactionCommit(); + } + + return TRUE; } diff --git a/dlls/kernelx/kernelx.cpp b/dlls/kernelx/kernelx.cpp index a9e12d8..b87855f 100644 --- a/dlls/kernelx/kernelx.cpp +++ b/dlls/kernelx/kernelx.cpp @@ -4,10 +4,6 @@ // ReSharper disable CppClangTidyHicppMultiwayPathsCovered // ReSharper disable CppClangTidyClangDiagnosticInconsistentDllimport #include "pch.h" -#include "kernelx.h" -#include -#include -#include NtAllocateVirtualMemory_t NtAllocateVirtualMemory; NtFreeVirtualMemory_t NtFreeVirtualMemory; @@ -317,8 +313,6 @@ __int64 XMemFree_X(PVOID P, __int64 a2) { return XMemFreeDefault_X(P, a2); } - - // Define PVOID for non-Windows environments if needed #ifndef _WINDEF_ typedef void* PVOID; diff --git a/dlls/kernelx/kernelx.vcxproj b/dlls/kernelx/kernelx.vcxproj index 66860ee..689dd1d 100644 --- a/dlls/kernelx/kernelx.vcxproj +++ b/dlls/kernelx/kernelx.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -26,19 +18,6 @@ 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -57,12 +36,6 @@ - - - - - - @@ -71,45 +44,15 @@ - W:\Xbox one Games\Minecraft_1.2.0.0_x64__zjr0dfhgjwvde\Mount - W:\Xbox one Games\Minecraft_1.2.0.0_x64__zjr0dfhgjwvde\Mount + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(IncludePath);$(ProjectDir)\..\..\thirdparty\Detours\include + $(LibraryPath);$(ProjectDir)\..\..\thirdparty\Detours\lib.X64; + + + $(IncludePath);$(SolutionPath)\thirdparty\thirdparty\Detours\includes + $(LibraryPath);$(SolutionPath)\thirdparty\thirdparty\Detours\lib.X64; - - - Level3 - true - WIN32;_DEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - Exports.def - - - - - Level3 - true - true - true - WIN32;NDEBUG;KERNELX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - Exports.def - - Level3 @@ -124,7 +67,7 @@ true false Exports.def - ntdll.lib;kernel32.lib;Synchronization.lib;%(AdditionalDependencies) + ntdll.lib;detours.lib;runtimeobject.lib;kernel32.lib;Synchronization.lib;%(AdditionalDependencies) @@ -144,7 +87,7 @@ true true false - ntdll.lib;%(AdditionalDependencies) + ntdll.lib;detours.lib;runtimeobject.lib;%(AdditionalDependencies) Exports.def @@ -158,14 +101,9 @@ Create - Create - Create Create - - - diff --git a/dlls/kernelx/pch.h b/dlls/kernelx/pch.h index 72216f2..7f720d8 100644 --- a/dlls/kernelx/pch.h +++ b/dlls/kernelx/pch.h @@ -1,13 +1,17 @@ -// pch.h: This is a precompiled header file. -// Files listed below are compiled only once, improving build performance for future builds. -// This also affects IntelliSense performance, including code completion and many code browsing features. -// However, files listed here are ALL re-compiled if any one of them is updated between builds. -// Do not add files here that you will be updating frequently as this negates the performance advantage. - #ifndef PCH_H #define PCH_H -// add headers that you want to pre-compile here #include "framework.h" +#include "kernelx.h" + +#include "detours.h" + +#include +#include +#include +#include +#include +#include +#include #endif //PCH_H \ No newline at end of file diff --git a/dlls/ntdll/ntdll.vcxproj b/dlls/ntdll/ntdll.vcxproj index 848b822..deae106 100644 --- a/dlls/ntdll/ntdll.vcxproj +++ b/dlls/ntdll/ntdll.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -40,19 +32,6 @@ 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -71,12 +50,6 @@ - - - - - - @@ -87,51 +60,9 @@ ntdll - - ntdll - - - ntdll - ntdll - - - Level3 - true - WIN32;_DEBUG;NTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - Exports.def - - - - - Level3 - true - true - true - WIN32;NDEBUG;NTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - Exports.def - - Level3 diff --git a/dlls/xg_x/xg_x.vcxproj b/dlls/xg_x/xg_x.vcxproj index bd412fa..131fc72 100644 --- a/dlls/xg_x/xg_x.vcxproj +++ b/dlls/xg_x/xg_x.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -26,19 +18,6 @@ 10.0 - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - DynamicLibrary true @@ -57,12 +36,6 @@ - - - - - - @@ -73,49 +46,9 @@ xgx - - xgx - - - xgx - xgx - - - Level3 - true - WIN32;_DEBUG;XGX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - - - - - Level3 - true - true - true - WIN32;NDEBUG;XGX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - - Level3 diff --git a/thirdparty/Detours b/thirdparty/Detours new file mode 160000 index 0000000..4b8c659 --- /dev/null +++ b/thirdparty/Detours @@ -0,0 +1 @@ +Subproject commit 4b8c659f549b0ab21cf649377c7a84eb708f5e68