Added some of the basic dlls.

This commit is contained in:
Tyler Jaacks 2024-09-03 19:29:06 -05:00
parent e199939ce8
commit 5b6e327d75
32 changed files with 719 additions and 384 deletions

View File

@ -395,5 +395,4 @@ FodyWeavers.xsd
*.msp
# JetBrains Rider
*.sln.iml
/JSON/Schemas/Catalog
*.sln.iml

View File

@ -1,326 +0,0 @@
// ReSharper disable CppInconsistentNaming
// NOLINT(performance-no-int-to-ptr)
#include <cstdio>
#include <tchar.h>
#include <Windows.h>
typedef struct BASE_RELOCATION_ENTRY
{
WORD Offset : 12;
WORD Type : 4;
} BASE_RELOCATION_ENTRY;
#define RELOC_32BIT_FIELD 3
BYTE* MapFileToMemory(const LPCSTR filename, LONGLONG &fileLength)
{
FILE* filePtr = fopen(filename, "rb");
fseek(filePtr, 0, SEEK_END);
fileLength = ftell(filePtr);
rewind(filePtr);
const auto buffer = static_cast<BYTE*>(malloc((fileLength + 1) * sizeof(char)));
fread(buffer, fileLength, 1, filePtr);
fclose(filePtr);
return buffer;
}
BYTE* GetNtHeaders(BYTE* peBuffer)
{
if (peBuffer == nullptr)
return nullptr;
const auto imageDosHeader = reinterpret_cast<IMAGE_DOS_HEADER*>(peBuffer);
if (imageDosHeader->e_magic != IMAGE_DOS_SIGNATURE)
return nullptr;
constexpr LONG kMaxOffset = 1024;
const LONG peOffset = imageDosHeader->e_lfanew;
if (peOffset > kMaxOffset) return nullptr;
const auto imageNtHeaders32 = reinterpret_cast<IMAGE_NT_HEADERS32*>(peBuffer + peOffset);
if (imageNtHeaders32->Signature != IMAGE_NT_SIGNATURE) return nullptr;
return reinterpret_cast<BYTE*>(imageNtHeaders32);
}
IMAGE_DATA_DIRECTORY* GetPeDir(const PVOID peBuffer, const size_t dirId)
{
if (dirId >= IMAGE_NUMBEROF_DIRECTORY_ENTRIES) return nullptr;
const auto ntHeaders = GetNtHeaders(static_cast<BYTE*>(peBuffer));
if (ntHeaders == nullptr) return nullptr;
const auto ntHeader = reinterpret_cast<IMAGE_NT_HEADERS*>(ntHeaders);
IMAGE_DATA_DIRECTORY* peDir = &(ntHeader->OptionalHeader.DataDirectory[dirId]);
if (peDir->VirtualAddress == NULL)
return nullptr;
return peDir;
}
BOOL FixImportAddressTable(const PVOID modulePtr)
{
printf("[+] Fix Import Address Table\n");
const IMAGE_DATA_DIRECTORY* importsDir = GetPeDir(modulePtr, IMAGE_DIRECTORY_ENTRY_IMPORT);
if (importsDir == nullptr) return FALSE;
const size_t maxSize = importsDir->Size;
const size_t impAddress = importsDir->VirtualAddress;
IMAGE_IMPORT_DESCRIPTOR* lib_desc = nullptr;
for (size_t parsedSize = 0; parsedSize < maxSize; parsedSize += sizeof(IMAGE_IMPORT_DESCRIPTOR)) {
lib_desc = reinterpret_cast<IMAGE_IMPORT_DESCRIPTOR*>(impAddress + parsedSize + reinterpret_cast<ULONG_PTR>(modulePtr));
if (lib_desc->OriginalFirstThunk == NULL && lib_desc->FirstThunk == NULL) break;
auto libName = reinterpret_cast<LPSTR>(reinterpret_cast<ULONGLONG>(modulePtr) + lib_desc->Name);
if (strcmp(libName, "PIXEvt.dll"))
{
// TODO: Need to get a Windows equivalent.
}
else if (strcmp(libName, "kernelx.dll") == 0)
{
libName = const_cast<LPSTR>("kernel32.dll");
}
else if (strcmp(libName, "d3d11_x.ddl") == 0)
{
// TODO: d3d11.dll is not getting loading or the Windows dll is not equivalent enough.
libName = const_cast<LPSTR>("d3d11.dll");
}
else if (strcmp(libName, "vccorlib110d.DLL") == 0)
{
// TODO: Need to get a Windows equivalent.
}
else if (strcmp(libName, "MSVCR110D.dll"))
{
// TODO: Need to get a Windows equivalent.
}
printf(" [+] Import DLL: %s\n", libName);
const size_t callVia = lib_desc->FirstThunk;
size_t thunkAddress = lib_desc->OriginalFirstThunk;
if (thunkAddress == NULL) thunkAddress = lib_desc->FirstThunk;
size_t offsetField = 0;
size_t offsetThunk = 0;
while (true)
{
const auto fieldThunk = reinterpret_cast<IMAGE_THUNK_DATA*>(reinterpret_cast<size_t>(modulePtr) + offsetField + callVia);
const auto orginThunk = reinterpret_cast<IMAGE_THUNK_DATA*>(reinterpret_cast<size_t>(modulePtr) + offsetThunk + thunkAddress);
// check if using ordinal (both x86 && x64)
if (orginThunk->u1.Ordinal & IMAGE_ORDINAL_FLAG32 || orginThunk->u1.Ordinal & IMAGE_ORDINAL_FLAG64)
{
const auto address = reinterpret_cast<size_t>(
GetProcAddress(LoadLibraryA(libName),
reinterpret_cast<char*>(orginThunk->u1.Ordinal & 0xFFFF)));
printf(" [V] API %llu at %llu\n", orginThunk->u1.Ordinal, address);
fieldThunk->u1.Function = printf(" [V] API %llu at %llu\n", orginThunk->u1.Ordinal, address);
}
if (fieldThunk->u1.Function == NULL) break;
if (fieldThunk->u1.Function == orginThunk->u1.Function) {
const auto by_name = reinterpret_cast<PIMAGE_IMPORT_BY_NAME>(reinterpret_cast<size_t>(modulePtr) + orginThunk->u1.AddressOfData);
const auto func_name = static_cast<LPSTR>(by_name->Name);
auto address = reinterpret_cast<size_t>(GetProcAddress(LoadLibraryA(libName), func_name));
printf(" [V] API %s at %llu\n", func_name, address);
fieldThunk->u1.Function = address;
}
offsetField += sizeof(IMAGE_THUNK_DATA);
offsetThunk += sizeof(IMAGE_THUNK_DATA);
}
}
return FALSE;
}
BOOL ApplyRelocation(const ULONGLONG newBase, const ULONGLONG oldBase, PVOID modulePtr, const SIZE_T moduleSize)
{
const IMAGE_DATA_DIRECTORY* relocDir = GetPeDir(modulePtr, IMAGE_DIRECTORY_ENTRY_BASERELOC);
/* Cannot relocate - application have no relocation table */
if (relocDir == nullptr)
return FALSE;
const size_t maxSize = relocDir->Size;
const size_t relocAddress = relocDir->VirtualAddress;
IMAGE_BASE_RELOCATION* reloc = nullptr;
size_t parsedSize = 0;
for (; parsedSize < maxSize; parsedSize += reloc->SizeOfBlock) {
reloc = reinterpret_cast<IMAGE_BASE_RELOCATION*>(relocAddress + parsedSize + reinterpret_cast<size_t>(modulePtr));
if (reloc->VirtualAddress == NULL || reloc->SizeOfBlock == 0)
break;
const size_t entriesNum = (reloc->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(BASE_RELOCATION_ENTRY);
const size_t page = reloc->VirtualAddress;
auto entry = reinterpret_cast<BASE_RELOCATION_ENTRY*>(reinterpret_cast<size_t>(reloc) + sizeof(IMAGE_BASE_RELOCATION));
for (size_t i = 0; i < entriesNum; i++) {
const size_t offset = entry->Offset;
const size_t type = entry->Type;
const size_t relocField = page + offset;
if (entry == nullptr || type == 0)
break;
if (type != RELOC_32BIT_FIELD) {
printf(" [!] Not supported relocations format at %d: %d\n", static_cast<int>(i), static_cast<int>(type));
return FALSE;
}
if (relocField >= moduleSize) {
printf(" [-] Out of Bound Field: %llu\n", relocField);
return FALSE;
}
const auto relocateAddress = reinterpret_cast<size_t*>(reinterpret_cast<size_t>(modulePtr) + relocField);
printf(" [V] Apply Relocation Field at %llu\n", *relocateAddress);
(*relocateAddress) = ((*relocateAddress) - oldBase + newBase);
entry = reinterpret_cast<BASE_RELOCATION_ENTRY*>(reinterpret_cast<size_t>(entry) + sizeof(BASE_RELOCATION_ENTRY));
}
}
return (parsedSize != 0);
return FALSE;
}
BOOL PELoader(const char* exePath)
{
LONGLONG file_size = -1;
BYTE* data = MapFileToMemory(exePath, file_size);
BYTE* pImageBase = nullptr;
LPVOID preferAddress = nullptr;
const auto ntHeader = reinterpret_cast<IMAGE_NT_HEADERS*>(GetNtHeaders(data));
if (!ntHeader)
{
printf("[+] File %p isn't a PE file.", exePath);
return FALSE;
}
const auto relocDir = GetPeDir(data, IMAGE_DIRECTORY_ENTRY_BASERELOC);
preferAddress = reinterpret_cast<LPVOID>(ntHeader->OptionalHeader.ImageBase);
printf("[+] Executable File Prefer Image Base at %p\n", preferAddress);
const HMODULE dll = LoadLibraryA("ntdll.dll");
reinterpret_cast<int(__stdcall*)(HANDLE, PVOID)>(GetProcAddress(dll, "NtUnmapViewOfSection"))(reinterpret_cast<HANDLE>(-1), reinterpret_cast<LPVOID>(ntHeader->OptionalHeader.ImageBase));
pImageBase = static_cast<BYTE*>(VirtualAlloc(preferAddress, ntHeader->OptionalHeader.SizeOfImage, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE));
if (!pImageBase && !relocDir)
{
printf("[-] Allocate Image Base At %p Failure.\n", preferAddress);
return FALSE;
}
if (!pImageBase && relocDir)
{
printf("[+] Try to Allocate Memory for New Image Base\n");
pImageBase = static_cast<BYTE*>(VirtualAlloc(nullptr, ntHeader->OptionalHeader.SizeOfImage, MEM_COMMIT | MEM_RESERVE,PAGE_EXECUTE_READWRITE));
if (!pImageBase)
{
printf("[-] Allocate Memory For Image Base Failure.\n");
return FALSE;
}
}
puts("[+] Mapping Section ...");
ntHeader->OptionalHeader.ImageBase = reinterpret_cast<size_t>(pImageBase);
memcpy(pImageBase, data, ntHeader->OptionalHeader.SizeOfHeaders);
const auto SectionHeaderArr = reinterpret_cast<IMAGE_SECTION_HEADER*>
(reinterpret_cast<size_t>(ntHeader) + sizeof(IMAGE_NT_HEADERS));
for (int i = 0; i < ntHeader->FileHeader.NumberOfSections; i++)
{
printf(" [+] Mapping Section %s\n", SectionHeaderArr[i].Name);
memcpy
(
reinterpret_cast<LPVOID>(reinterpret_cast<size_t>(pImageBase)
+ SectionHeaderArr[i].VirtualAddress),
reinterpret_cast<LPVOID>(reinterpret_cast<size_t>(data)
+ SectionHeaderArr[i].PointerToRawData),
SectionHeaderArr[i].SizeOfRawData
);
}
// masqueradeCmdline(cmdline);
// fixIAT(pImageBase);
FixImportAddressTable(pImageBase);
if (pImageBase != preferAddress)
if (ApplyRelocation(reinterpret_cast<size_t>(pImageBase), reinterpret_cast<size_t>(preferAddress),
pImageBase,
ntHeader->OptionalHeader.SizeOfImage))
puts("[+] Relocation Fixed.");
size_t returnAddress = reinterpret_cast<size_t>(pImageBase)+ntHeader->OptionalHeader.AddressOfEntryPoint;
printf("Run Exe Module: %p\n", exePath);
// return reinterpret_cast<void(*)()>(returnAddress)();
return FALSE;
}
int main(const int argc, char** argv)
{
if (argc != 2) {
printf("Usage: xbonemu [exePath]\n");
return FALSE;
}
const char* exePath = argv[1];
PELoader(exePath);
return FALSE;
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XBONEmu", "XBONEmu.vcxproj", "{F5FE103A-847F-4274-90B5-1258A5ECD570}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Debug|x64.ActiveCfg = Debug|x64
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Debug|x64.Build.0 = Debug|x64
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Debug|x86.ActiveCfg = Debug|Win32
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Debug|x86.Build.0 = Debug|Win32
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Release|x64.ActiveCfg = Release|x64
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Release|x64.Build.0 = Release|x64
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Release|x86.ActiveCfg = Release|Win32
{F5FE103A-847F-4274-90B5-1258A5ECD570}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3E61A206-56BC-472D-B9E0-35626FDED988}
EndGlobalSection
EndGlobal

68
XBONEmu.sln Normal file
View File

@ -0,0 +1,68 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
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}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dlls", "dlls", "{A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11_x", "dlls\d3d11_x\d3d11_x\d3d11_x.vcxproj", "{8941C1F2-702A-45BE-88BF-DD90DEFE4334}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d12_x", "dlls\d3d12_x\d3d12_x.vcxproj", "{B7848E35-3881-44CC-89B9-C14D32B2BC42}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntdll", "dlls\ntdll\ntdll.vcxproj", "{7639E4A9-40B7-4709-864A-72A1879AADED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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|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
{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|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
{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|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|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|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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{94127830-3A6C-4861-BBD2-20C0D289802D} = {A46DB9F5-4A23-41CA-98CA-A5DE9DDF012A}
{8941C1F2-702A-45BE-88BF-DD90DEFE4334} = {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}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {19991728-E423-4D8D-9EF8-1311EFB03952}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,2 @@
#define D3D11X_API __declspec(dllexport)
#define D3D11X_API __declspec(dllimport)

View File

@ -0,0 +1,22 @@
// d3d11_x.cpp : Defines the exported functions for the DLL.
//
#include "pch.h"
#include "framework.h"
#include "d3d11_x.h"
// This is an example of an exported variable
D3D11X_API int nd3d11x=0;
// This is an example of an exported function.
D3D11X_API int fnd3d11x(void)
{
return 0;
}
// This is the constructor of a class that has been exported.
Cd3d11x::Cd3d11x()
{
return;
}

View File

@ -0,0 +1,22 @@
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the D3D11X_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// D3D11X_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef D3D11X_EXPORTS
#define D3D11X_API __declspec(dllexport)
#else
#define D3D11X_API __declspec(dllimport)
#endif
// This class is exported from the dll
class D3D11X_API Cd3d11x {
public:
Cd3d11x(void);
// TODO: add your methods here.
};
extern D3D11X_API int nd3d11x;
D3D11X_API int fnd3d11x(void);

View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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>{8941c1f2-702a-45be-88bf-dd90defe4334}</ProjectGuid>
<RootNamespace>d3d11x</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<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|Win32'">
<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|Win32'">
<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)'=='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'">
<TargetName>d3d11x</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>d3d11x</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>d3d11x</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>d3d11x</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;D3D11X_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;D3D11X_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;D3D11X_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;D3D11X_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>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="d3d11_x.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="d3d11_x.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="d3d11_x.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="d3d11_x.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,19 @@
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

View File

@ -17,18 +17,13 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Source\main.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{f5fe103a-847f-4274-90b5-1258a5ecd570}</ProjectGuid>
<RootNamespace>XBONEmu</RootNamespace>
<ProjectGuid>{b7848e35-3881-44cc-89b9-c14d32b2bc42}</ProjectGuid>
<RootNamespace>d3d12x</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -58,24 +53,27 @@
<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|Win32'">
<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|Win32'">
<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)'=='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 Label="Shared" >
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<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|Win32'">
<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)'=='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" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@ -108,7 +106,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
@ -122,7 +120,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
@ -132,7 +130,9 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup></ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
</Project>

5
dlls/kernelx/framework.h Normal file
View File

@ -0,0 +1,5 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>

5
dlls/kernelx/pch.cpp Normal file
View File

@ -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.

13
dlls/kernelx/pch.h Normal file
View File

@ -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

2
dlls/ntdll/cpp.hint Normal file
View File

@ -0,0 +1,2 @@
#define NTDLL_API __declspec(dllexport)
#define NTDLL_API __declspec(dllimport)

19
dlls/ntdll/dllmain.cpp Normal file
View File

@ -0,0 +1,19 @@
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

5
dlls/ntdll/framework.h Normal file
View File

@ -0,0 +1,5 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>

22
dlls/ntdll/ntdll.cpp Normal file
View File

@ -0,0 +1,22 @@
// ntdll.cpp : Defines the exported functions for the DLL.
//
#include "pch.h"
#include "framework.h"
#include "ntdll.h"
// This is an example of an exported variable
NTDLL_API int nntdll=0;
// This is an example of an exported function.
NTDLL_API int fnntdll(void)
{
return 0;
}
// This is the constructor of a class that has been exported.
Cntdll::Cntdll()
{
return;
}

22
dlls/ntdll/ntdll.h Normal file
View File

@ -0,0 +1,22 @@
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the NTDLL_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// NTDLL_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef NTDLL_EXPORTS
#define NTDLL_API __declspec(dllexport)
#else
#define NTDLL_API __declspec(dllimport)
#endif
// This class is exported from the dll
class NTDLL_API Cntdll {
public:
Cntdll(void);
// TODO: add your methods here.
};
extern NTDLL_API int nntdll;
NTDLL_API int fnntdll(void);

174
dlls/ntdll/ntdll.vcxproj Normal file
View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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>{7639e4a9-40b7-4709-864a-72a1879aaded}</ProjectGuid>
<RootNamespace>ntdll</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<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|Win32'">
<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|Win32'">
<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)'=='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'">
<TargetName>ntdll</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>ntdll</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>ntdll</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>ntdll</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;NTDLL_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;NTDLL_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;NTDLL_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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;NTDLL_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>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="ntdll.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="ntdll.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ntdll.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ntdll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

5
dlls/ntdll/pch.cpp Normal file
View File

@ -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.

13
dlls/ntdll/pch.h Normal file
View File

@ -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