Skip to content

Commit 3cce832

Browse files
authored
Merge 02cfdc6 into 146c27e
2 parents 146c27e + 02cfdc6 commit 3cce832

24 files changed

+631
-48
lines changed

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@
2020
# Build results
2121
[Dd]ebug/
2222
[Dd]ebug64/
23+
[Dd]ebugARM64/
2324
[Dd]ebugPublic/
2425
[Rr]elease/
2526
[Rr]elease64/
27+
[Rr]eleaseARM64/
2628
[Rr]eleases/
2729
x64/
2830
x86/
31+
ARM64/
2932
bld/
3033
[Bb]in/
3134
[Oo]bj/

‎Src/ClassicExplorer/ClassicExplorer.vcxproj

+31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|ARM64EC">
9+
<Configuration>Debug</Configuration>
10+
<Platform>ARM64EC</Platform>
11+
</ProjectConfiguration>
412
<ProjectConfiguration Include="Debug|Win32">
513
<Configuration>Debug</Configuration>
614
<Platform>Win32</Platform>
@@ -9,6 +17,14 @@
917
<Configuration>Debug</Configuration>
1018
<Platform>x64</Platform>
1119
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release|ARM64">
21+
<Configuration>Release</Configuration>
22+
<Platform>ARM64</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
1228
<ProjectConfiguration Include="Release|Win32">
1329
<Configuration>Release</Configuration>
1430
<Platform>Win32</Platform>
@@ -17,6 +33,14 @@
1733
<Configuration>Release</Configuration>
1834
<Platform>x64</Platform>
1935
</ProjectConfiguration>
36+
<ProjectConfiguration Include="Setup|ARM64">
37+
<Configuration>Setup</Configuration>
38+
<Platform>ARM64</Platform>
39+
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Setup|ARM64EC">
41+
<Configuration>Setup</Configuration>
42+
<Platform>ARM64EC</Platform>
43+
</ProjectConfiguration>
2044
<ProjectConfiguration Include="Setup|Win32">
2145
<Configuration>Setup</Configuration>
2246
<Platform>Win32</Platform>
@@ -53,6 +77,13 @@
5377
<PropertyGroup Condition="'$(Platform)'=='x64'">
5478
<TargetName>$(ProjectName)64</TargetName>
5579
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
81+
<TargetName>$(ProjectName)64</TargetName>
82+
</PropertyGroup>
83+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
84+
<TargetName>$(ProjectName)64</TargetName>
85+
<BuildAsX>true</BuildAsX>
86+
</PropertyGroup>
5687
<PropertyGroup>
5788
<IgnoreImportLibrary>true</IgnoreImportLibrary>
5889
</PropertyGroup>

‎Src/ClassicExplorer/ClassicExplorer.vcxproj.filters

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@
146146
<Filter>Resource Files</Filter>
147147
</Image>
148148
</ItemGroup>
149-
</Project>
149+
</Project>

‎Src/ClassicIE/ClassicIE.vcxproj

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM64</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|ARM64">
17+
<Configuration>Release</Configuration>
18+
<Platform>ARM64</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="Release|Win32">
1321
<Configuration>Release</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>Release</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="Setup|ARM64">
29+
<Configuration>Setup</Configuration>
30+
<Platform>ARM64</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="Setup|Win32">
2133
<Configuration>Setup</Configuration>
2234
<Platform>Win32</Platform>
@@ -53,6 +65,9 @@
5365
<PropertyGroup Condition="'$(Platform)'=='x64'">
5466
<TargetName>$(ProjectName)_64</TargetName>
5567
</PropertyGroup>
68+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
69+
<TargetName>$(ProjectName)_64</TargetName>
70+
</PropertyGroup>
5671
<ItemDefinitionGroup>
5772
<ClCompile>
5873
<PrecompiledHeader>NotUsing</PrecompiledHeader>

‎Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj

+31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|ARM64EC">
9+
<Configuration>Debug</Configuration>
10+
<Platform>ARM64EC</Platform>
11+
</ProjectConfiguration>
412
<ProjectConfiguration Include="Debug|Win32">
513
<Configuration>Debug</Configuration>
614
<Platform>Win32</Platform>
@@ -9,6 +17,14 @@
917
<Configuration>Debug</Configuration>
1018
<Platform>x64</Platform>
1119
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release|ARM64">
21+
<Configuration>Release</Configuration>
22+
<Platform>ARM64</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
1228
<ProjectConfiguration Include="Release|Win32">
1329
<Configuration>Release</Configuration>
1430
<Platform>Win32</Platform>
@@ -17,6 +33,14 @@
1733
<Configuration>Release</Configuration>
1834
<Platform>x64</Platform>
1935
</ProjectConfiguration>
36+
<ProjectConfiguration Include="Setup|ARM64">
37+
<Configuration>Setup</Configuration>
38+
<Platform>ARM64</Platform>
39+
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Setup|ARM64EC">
41+
<Configuration>Setup</Configuration>
42+
<Platform>ARM64EC</Platform>
43+
</ProjectConfiguration>
2044
<ProjectConfiguration Include="Setup|Win32">
2145
<Configuration>Setup</Configuration>
2246
<Platform>Win32</Platform>
@@ -53,6 +77,13 @@
5377
<PropertyGroup Condition="'$(Platform)'=='x64'">
5478
<TargetName>$(ProjectName)_64</TargetName>
5579
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
81+
<TargetName>$(ProjectName)_64</TargetName>
82+
</PropertyGroup>
83+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
84+
<TargetName>$(ProjectName)_64</TargetName>
85+
<BuildAsX>true</BuildAsX>
86+
</PropertyGroup>
5687
<ItemDefinitionGroup>
5788
<ClCompile>
5889
<PreprocessorDefinitions>_USRDLL;CLASSICIEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

‎Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj.filters

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@
9898
<Filter>Resource Files</Filter>
9999
</Image>
100100
</ItemGroup>
101-
</Project>
101+
</Project>

‎Src/Common.props

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
<OutDir>$(MSBuildThisFileDirectory)..\build\bin\$(Configuration)64\</OutDir>
1717
<IntDir>$(MSBuildThisFileDirectory)..\build\obj\$(ProjectName)\$(Configuration)64\</IntDir>
1818
</PropertyGroup>
19+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
20+
<OutDir>$(MSBuildThisFileDirectory)..\build\bin\$(Configuration)ARM64\</OutDir>
21+
<IntDir>$(MSBuildThisFileDirectory)..\build\obj\$(ProjectName)\$(Configuration)ARM64\</IntDir>
22+
</PropertyGroup>
23+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
24+
<OutDir>$(MSBuildThisFileDirectory)..\build\bin\$(Configuration)ARM64EC\</OutDir>
25+
<IntDir>$(MSBuildThisFileDirectory)..\build\obj\$(ProjectName)\$(Configuration)ARM64EC\</IntDir>
26+
</PropertyGroup>
1927

2028
<!-- Common settings for all configurations -->
2129
<ItemDefinitionGroup>

‎Src/Lib/IatHookHelper.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,17 @@ IatHookData *SetIatHook( IMAGE_DOS_HEADER *dosHeader, DWORD iatOffset, DWORD int
7070
{
7171
IatHookData *hook=g_IatHooks+g_IatHookCount;
7272
g_IatHookCount++;
73+
#if defined(_M_AMD64) || defined(_M_IX86)
7374
hook->jump[0]=hook->jump[1]=0x90; // NOP
7475
hook->jump[2]=0xFF; hook->jump[3]=0x25; // JUMP
75-
#ifdef _WIN64
76+
#if defined(_M_AMD64)
7677
hook->jumpOffs=0;
7778
#else
7879
hook->jumpOffs=(DWORD)(hook)+8;
80+
#endif
81+
#elif defined(_M_ARM64)
82+
hook->jump[0]=0x48; hook->jump[1]=0x00; hook->jump[2]=0x00; hook->jump[3]=0x58; // LDR X8, newProc
83+
hook->jump[4]=0x00; hook->jump[5]=0x01; hook->jump[6]=0x1F; hook->jump[7]=0xD6; // BR X8
7984
#endif
8085
hook->newProc=newProc;
8186
hook->oldProc=(void*)thunk->u1.Function;

‎Src/Lib/IatHookHelper.h

+4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
struct IatHookData
88
{
9+
#if defined(_M_AMD64) || defined(_M_IX86)
910
unsigned char jump[4]; // jump instruction 0x90, 0x90, 0xFF, 0x25
1011
DWORD jumpOffs; // jump instruction offset
12+
#elif defined(_M_ARM64)
13+
unsigned char jump[8]; // LDR <address>, BR
14+
#endif
1115
void *newProc; // the address of the new proc
1216
void *oldProc; // the address of the old proc
1317
IMAGE_THUNK_DATA *thunk; // the IAT thunk

‎Src/Lib/Lib.vcxproj

+19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|ARM64EC">
9+
<Configuration>Debug</Configuration>
10+
<Platform>ARM64EC</Platform>
11+
</ProjectConfiguration>
412
<ProjectConfiguration Include="Debug|Win32">
513
<Configuration>Debug</Configuration>
614
<Platform>Win32</Platform>
@@ -9,6 +17,14 @@
917
<Configuration>Debug</Configuration>
1018
<Platform>x64</Platform>
1119
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release|ARM64">
21+
<Configuration>Release</Configuration>
22+
<Platform>ARM64</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
1228
<ProjectConfiguration Include="Release|Win32">
1329
<Configuration>Release</Configuration>
1430
<Platform>Win32</Platform>
@@ -42,6 +58,9 @@
4258
<PropertyGroup>
4359
<OutDir>$(IntDir)</OutDir>
4460
</PropertyGroup>
61+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
62+
<BuildAsX>true</BuildAsX>
63+
</PropertyGroup>
4564
<ItemDefinitionGroup>
4665
<ClCompile>
4766
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>

0 commit comments

Comments
 (0)