├── chpe_dll ├── chpe_dll.def ├── chpe_dll.cpp ├── chpe_dll.vcxproj.filters └── chpe_dll.vcxproj ├── chpe_exe ├── chpe_exe.vcxproj.filters ├── chpe_exe.cpp └── chpe_exe.vcxproj ├── README.md ├── chpe_example.sln ├── LICENSE └── .gitignore /chpe_dll/chpe_dll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | f1 3 | f2 4 | -------------------------------------------------------------------------------- /chpe_dll/chpe_dll.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void f1() 5 | { 6 | puts( 7 | "DLL: " 8 | #if defined(_M_IX86) 9 | "x86" 10 | #ifdef _M_HYBRID 11 | " (CHPE" 12 | #elif defined(_M_HYBRID_X86_ARM64) 13 | "/ARM64)" 14 | #elif defined(_M_HYBRID_X86) 15 | "/x86)" 16 | #endif 17 | #elif defined(_M_X64) 18 | "x64" 19 | #ifdef _M_ARM64EC 20 | " (ARM64EC)" 21 | #endif 22 | #elif defined(_M_ARM64) 23 | "ARM64" 24 | #elif defined(_M_ARM64EC) 25 | "ARM64EC" 26 | #elif defined(_M_ARM) 27 | "ARM" 28 | #endif 29 | ); 30 | } 31 | void f2() 32 | { 33 | #ifdef _M_HYBRID 34 | puts( 35 | "EXE: (CHPE" 36 | #if defined(_M_HYBRID_X86_ARM64) 37 | "/ARM64)" 38 | #elif defined(_M_HYBRID_X86) 39 | "/x86)" 40 | #endif 41 | ); 42 | __asm ret 43 | #endif 44 | } -------------------------------------------------------------------------------- /chpe_exe/chpe_exe.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /chpe_dll/chpe_dll.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | -------------------------------------------------------------------------------- /chpe_exe/chpe_exe.cpp: -------------------------------------------------------------------------------- 1 | #define WIN32_LEAN_AND_MEAN 2 | #include 3 | #include 4 | #include 5 | 6 | void f() 7 | #ifdef _M_HYBRID 8 | { 9 | puts( 10 | "EXE: (CHPE" 11 | #if defined(_M_HYBRID_X86_ARM64) 12 | "/ARM64)" 13 | #elif defined(_M_HYBRID_X86) 14 | "/x86)" 15 | #endif 16 | ); 17 | __asm ret 18 | } 19 | #endif 20 | ; 21 | int main() 22 | { 23 | puts( 24 | "EXE: " 25 | #if defined(_M_IX86) 26 | "x86" 27 | #ifdef _M_HYBRID 28 | " (CHPE" 29 | #elif defined(_M_HYBRID_X86_ARM64) 30 | "/ARM64)" 31 | #elif defined(_M_HYBRID_X86) 32 | "/x86)" 33 | #endif 34 | #elif defined(_M_X64) 35 | "x64" 36 | #ifdef _M_ARM64EC 37 | " (ARM64EC)" 38 | #endif 39 | #elif defined(_M_ARM64) 40 | "ARM64" 41 | #elif defined(_M_ARM64EC) 42 | "ARM64EC" 43 | #elif defined(_M_ARM) 44 | "ARM" 45 | #endif 46 | ); 47 | 48 | #ifdef _M_HYBRID 49 | f(); 50 | #endif 51 | 52 | std::filesystem::current_path(".."); 53 | 54 | const std::filesystem::path dirs[] = { 55 | "./", 56 | "./x64", 57 | "./ARM64", 58 | "./ARM64EC", 59 | "./CHPE" 60 | }; 61 | 62 | for (auto&& dir : dirs) 63 | { 64 | auto dll_path = dir / 65 | #ifdef _DEBUG 66 | "Debug" 67 | #else 68 | "Release" 69 | #endif 70 | "/chpe_dll.dll"; 71 | if (auto dll = LoadLibraryW(dll_path.c_str())) 72 | { 73 | auto f1 = reinterpret_cast(GetProcAddress(dll, "f1")); 74 | auto f2 = reinterpret_cast(GetProcAddress(dll, "f2")); 75 | if (f1) 76 | { 77 | _putws(dll_path.c_str()); 78 | f1(); 79 | } 80 | if (f2) 81 | { 82 | f2(); 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # chpe_example 2 | 3 | ## How to make CHPE 4 | 1. Modify the .sln/.vcxproj file yourself by text editor to allow ``$(Platform) == CHPE``. 5 | 2. [Download EWDK](https://docs.microsoft.com/windows-hardware/drivers/download-the-wdk#enterprise-wdk-ewdk). 6 | 3. Open Visual Studio through ``SetupVSEnv`` in EWDK environment. 7 | 4. Open modified .sln or .vcxproj from SetupVSEnv-ed VS. (Don't open from explorer) 8 | 5. Make additional project settings. 9 | - \[MUST\] Remove ``odbccp32.lib`` from ``Linker`` -> ``Input`` -> ``Additional Dependencies``. It's not exist. 10 | - \[MUST\] Set the ``General`` -> ``Windows SDK Version`` to ``$(Version_Number)``. The EWDK environment use discrete Windows SDK. 11 | - [Can use the Condition element to share project in both EWDK and non-EWDK environments](chpe_exe/chpe_exe.vcxproj#L51). 12 | - \[MAY\] Change ``General`` -> ``Platform Toolset``. 13 | - \[I Recommend\] Change ``General`` -> ``Output Directory`` and ``Intermediate Directory``. By default it mixes with x86. 14 | - \[For DEBUG\] Disable ``C/C++`` -> ``Optimization`` -> ``Optimization``. The default value is on. 15 | - \[For DEBUG\] Change ``C/C++`` -> ``General`` -> ``Debug Information Format`` to other than ``Program Database for Edit And Continue``. ``Control Flow Guard`` cannot be turned off. 16 | - \[For DEBUG\] Disable ``C/C++`` -> ``General`` -> ``Support Just My Code Debugging``. If do not turn it off, will get an internal compiler error. 17 | - \[For DLL\] Disable ``Advanced`` -> ``Whole Program Optimization`` or Add ``/NOIMPLIB`` to ``Linker`` -> ``Command Line`` -> ``Additional Options``. If do not, will get ``LINK : fatal error LNK1376: /DLL and /WOWA64 are incompatible when producing an import library. Generate the import library separately.`` 18 | 19 | ## Predefined macros 20 | 21 | ### By compiler 22 | 23 | | | X86 | X64 | CHPE
(x86) | CHPE
(ARM64) | ARM64 | ARM64EC | 24 | | --- | --- | --- | --- | --- | --- | --- | 25 | | \_M_IX86 | defined | | defined | defined | 26 | | \_M_X64
\_M_AMD64 | | defined | | | | defined | 27 | | \_M_HYBRID | | | defined | defined | | | 28 | | \_M_HYBRID_X86 | | | defined | | | 29 | | \_M_HYBRID_X86_ARM64 | | | | defined | | | 30 | | \_M_ARM64 | | | | | defined | | 31 | | \_M_ARM64EC | | | | | | defined | 32 | | \_WIN64 | | defined | | | defined | defined | 33 | 34 | ### By msbuild 35 | 36 | | | X86 | X64 | CHPE
(x86) | CHPE
(ARM64) | ARM64 | ARM64EC 37 | | --- | --- | --- | --- | --- | --- | --- | 38 | | \_CHPE_
\_CHPE_X86_ARM64_
i386
\_X86_ | | | defined | defined | | | 39 | | ARM64EC
\_ARM64EC_
AMD64
\_AMD64_ | | | | | | defined | 40 | 41 | ## a 42 | CHPE is compiled twice. As x86, and as ARM64. X86 is used for parts that could not be compiled as ARM64 on a function-by-function (such as containg inline assembler or intrinsic function). 43 | -------------------------------------------------------------------------------- /chpe_example.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31507.150 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chpe_exe", "chpe_exe\chpe_exe.vcxproj", "{29C1A988-D8BE-4B73-9034-E795462D7910}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {AC996C50-0916-4751-9300-0B221C7456BD} = {AC996C50-0916-4751-9300-0B221C7456BD} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chpe_dll", "chpe_dll\chpe_dll.vcxproj", "{AC996C50-0916-4751-9300-0B221C7456BD}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|ARM64 = Debug|ARM64 16 | Debug|ARM64EC = Debug|ARM64EC 17 | Debug|CHPE = Debug|CHPE 18 | Debug|x64 = Debug|x64 19 | Debug|x86 = Debug|x86 20 | Release|ARM64 = Release|ARM64 21 | Release|ARM64EC = Release|ARM64EC 22 | Release|CHPE = Release|CHPE 23 | Release|x64 = Release|x64 24 | Release|x86 = Release|x86 25 | EndGlobalSection 26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 27 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|ARM64.ActiveCfg = Debug|ARM64 28 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|ARM64.Build.0 = Debug|ARM64 29 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC 30 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|ARM64EC.Build.0 = Debug|ARM64EC 31 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|CHPE.ActiveCfg = Debug|CHPE 32 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|CHPE.Build.0 = Debug|CHPE 33 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|x64.ActiveCfg = Debug|x64 34 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|x64.Build.0 = Debug|x64 35 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|x86.ActiveCfg = Debug|Win32 36 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Debug|x86.Build.0 = Debug|Win32 37 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|ARM64.ActiveCfg = Release|ARM64 38 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|ARM64.Build.0 = Release|ARM64 39 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|ARM64EC.ActiveCfg = Release|ARM64EC 40 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|ARM64EC.Build.0 = Release|ARM64EC 41 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|CHPE.ActiveCfg = Release|CHPE 42 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|CHPE.Build.0 = Release|CHPE 43 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|x64.ActiveCfg = Release|x64 44 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|x64.Build.0 = Release|x64 45 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|x86.ActiveCfg = Release|Win32 46 | {29C1A988-D8BE-4B73-9034-E795462D7910}.Release|x86.Build.0 = Release|Win32 47 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|ARM64.ActiveCfg = Debug|ARM64 48 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|ARM64.Build.0 = Debug|ARM64 49 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC 50 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|ARM64EC.Build.0 = Debug|ARM64EC 51 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|CHPE.ActiveCfg = Debug|CHPE 52 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|CHPE.Build.0 = Debug|CHPE 53 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|x64.ActiveCfg = Debug|x64 54 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|x64.Build.0 = Debug|x64 55 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|x86.ActiveCfg = Debug|Win32 56 | {AC996C50-0916-4751-9300-0B221C7456BD}.Debug|x86.Build.0 = Debug|Win32 57 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|ARM64.ActiveCfg = Release|ARM64 58 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|ARM64.Build.0 = Release|ARM64 59 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|ARM64EC.ActiveCfg = Release|ARM64EC 60 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|ARM64EC.Build.0 = Release|ARM64EC 61 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|CHPE.ActiveCfg = Release|CHPE 62 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|CHPE.Build.0 = Release|CHPE 63 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|x64.ActiveCfg = Release|x64 64 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|x64.Build.0 = Release|x64 65 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|x86.ActiveCfg = Release|Win32 66 | {AC996C50-0916-4751-9300-0B221C7456BD}.Release|x86.Build.0 = Release|Win32 67 | EndGlobalSection 68 | GlobalSection(SolutionProperties) = preSolution 69 | HideSolutionNode = FALSE 70 | EndGlobalSection 71 | GlobalSection(ExtensibilityGlobals) = postSolution 72 | SolutionGuid = {ED92BDB8-317F-41AF-AE3C-30123A1544E4} 73 | EndGlobalSection 74 | EndGlobal 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | CHPE/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # StyleCop 66 | StyleCopReport.xml 67 | 68 | # Files built by Visual Studio 69 | *_i.c 70 | *_p.c 71 | *_h.h 72 | *.ilk 73 | *.meta 74 | *.obj 75 | *.iobj 76 | *.pch 77 | *.pdb 78 | *.ipdb 79 | *.pgc 80 | *.pgd 81 | *.rsp 82 | *.sbr 83 | *.tlb 84 | *.tli 85 | *.tlh 86 | *.tmp 87 | *.tmp_proj 88 | *_wpftmp.csproj 89 | *.log 90 | *.vspscc 91 | *.vssscc 92 | .builds 93 | *.pidb 94 | *.svclog 95 | *.scc 96 | 97 | # Chutzpah Test files 98 | _Chutzpah* 99 | 100 | # Visual C++ cache files 101 | ipch/ 102 | *.aps 103 | *.ncb 104 | *.opendb 105 | *.opensdf 106 | *.sdf 107 | *.cachefile 108 | *.VC.db 109 | *.VC.VC.opendb 110 | 111 | # Visual Studio profiler 112 | *.psess 113 | *.vsp 114 | *.vspx 115 | *.sap 116 | 117 | # Visual Studio Trace Files 118 | *.e2e 119 | 120 | # TFS 2012 Local Workspace 121 | $tf/ 122 | 123 | # Guidance Automation Toolkit 124 | *.gpState 125 | 126 | # ReSharper is a .NET coding add-in 127 | _ReSharper*/ 128 | *.[Rr]e[Ss]harper 129 | *.DotSettings.user 130 | 131 | # TeamCity is a build add-in 132 | _TeamCity* 133 | 134 | # DotCover is a Code Coverage Tool 135 | *.dotCover 136 | 137 | # AxoCover is a Code Coverage Tool 138 | .axoCover/* 139 | !.axoCover/settings.json 140 | 141 | # Visual Studio code coverage results 142 | *.coverage 143 | *.coveragexml 144 | 145 | # NCrunch 146 | _NCrunch_* 147 | .*crunch*.local.xml 148 | nCrunchTemp_* 149 | 150 | # MightyMoose 151 | *.mm.* 152 | AutoTest.Net/ 153 | 154 | # Web workbench (sass) 155 | .sass-cache/ 156 | 157 | # Installshield output folder 158 | [Ee]xpress/ 159 | 160 | # DocProject is a documentation generator add-in 161 | DocProject/buildhelp/ 162 | DocProject/Help/*.HxT 163 | DocProject/Help/*.HxC 164 | DocProject/Help/*.hhc 165 | DocProject/Help/*.hhk 166 | DocProject/Help/*.hhp 167 | DocProject/Help/Html2 168 | DocProject/Help/html 169 | 170 | # Click-Once directory 171 | publish/ 172 | 173 | # Publish Web Output 174 | *.[Pp]ublish.xml 175 | *.azurePubxml 176 | # Note: Comment the next line if you want to checkin your web deploy settings, 177 | # but database connection strings (with potential passwords) will be unencrypted 178 | *.pubxml 179 | *.publishproj 180 | 181 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 182 | # checkin your Azure Web App publish settings, but sensitive information contained 183 | # in these scripts will be unencrypted 184 | PublishScripts/ 185 | 186 | # NuGet Packages 187 | *.nupkg 188 | # NuGet Symbol Packages 189 | *.snupkg 190 | # The packages folder can be ignored because of Package Restore 191 | **/[Pp]ackages/* 192 | # except build/, which is used as an MSBuild target. 193 | !**/[Pp]ackages/build/ 194 | # Uncomment if necessary however generally it will be regenerated when needed 195 | #!**/[Pp]ackages/repositories.config 196 | # NuGet v3's project.json files produces more ignorable files 197 | *.nuget.props 198 | *.nuget.targets 199 | 200 | # Microsoft Azure Build Output 201 | csx/ 202 | *.build.csdef 203 | 204 | # Microsoft Azure Emulator 205 | ecf/ 206 | rcf/ 207 | 208 | # Windows Store app package directories and files 209 | AppPackages/ 210 | BundleArtifacts/ 211 | Package.StoreAssociation.xml 212 | _pkginfo.txt 213 | *.appx 214 | *.appxbundle 215 | *.appxupload 216 | 217 | # Visual Studio cache files 218 | # files ending in .cache can be ignored 219 | *.[Cc]ache 220 | # but keep track of directories ending in .cache 221 | !?*.[Cc]ache/ 222 | 223 | # Others 224 | ClientBin/ 225 | ~$* 226 | *~ 227 | *.dbmdl 228 | *.dbproj.schemaview 229 | *.jfm 230 | *.pfx 231 | *.publishsettings 232 | orleans.codegen.cs 233 | 234 | # Including strong name files can present a security risk 235 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 236 | #*.snk 237 | 238 | # Since there are multiple workflows, uncomment next line to ignore bower_components 239 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 240 | #bower_components/ 241 | 242 | # RIA/Silverlight projects 243 | Generated_Code/ 244 | 245 | # Backup & report files from converting an old project file 246 | # to a newer Visual Studio version. Backup files are not needed, 247 | # because we have git ;-) 248 | _UpgradeReport_Files/ 249 | Backup*/ 250 | UpgradeLog*.XML 251 | UpgradeLog*.htm 252 | ServiceFabricBackup/ 253 | *.rptproj.bak 254 | 255 | # SQL Server files 256 | *.mdf 257 | *.ldf 258 | *.ndf 259 | 260 | # Business Intelligence projects 261 | *.rdl.data 262 | *.bim.layout 263 | *.bim_*.settings 264 | *.rptproj.rsuser 265 | *- [Bb]ackup.rdl 266 | *- [Bb]ackup ([0-9]).rdl 267 | *- [Bb]ackup ([0-9][0-9]).rdl 268 | 269 | # Microsoft Fakes 270 | FakesAssemblies/ 271 | 272 | # GhostDoc plugin setting file 273 | *.GhostDoc.xml 274 | 275 | # Node.js Tools for Visual Studio 276 | .ntvs_analysis.dat 277 | node_modules/ 278 | 279 | # Visual Studio 6 build log 280 | *.plg 281 | 282 | # Visual Studio 6 workspace options file 283 | *.opt 284 | 285 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 286 | *.vbw 287 | 288 | # Visual Studio LightSwitch build output 289 | **/*.HTMLClient/GeneratedArtifacts 290 | **/*.DesktopClient/GeneratedArtifacts 291 | **/*.DesktopClient/ModelManifest.xml 292 | **/*.Server/GeneratedArtifacts 293 | **/*.Server/ModelManifest.xml 294 | _Pvt_Extensions 295 | 296 | # Paket dependency manager 297 | .paket/paket.exe 298 | paket-files/ 299 | 300 | # FAKE - F# Make 301 | .fake/ 302 | 303 | # CodeRush personal settings 304 | .cr/personal 305 | 306 | # Python Tools for Visual Studio (PTVS) 307 | __pycache__/ 308 | *.pyc 309 | 310 | # Cake - Uncomment if you are using it 311 | # tools/** 312 | # !tools/packages.config 313 | 314 | # Tabs Studio 315 | *.tss 316 | 317 | # Telerik's JustMock configuration file 318 | *.jmconfig 319 | 320 | # BizTalk build output 321 | *.btp.cs 322 | *.btm.cs 323 | *.odx.cs 324 | *.xsd.cs 325 | 326 | # OpenCover UI analysis results 327 | OpenCover/ 328 | 329 | # Azure Stream Analytics local run output 330 | ASALocalRun/ 331 | 332 | # MSBuild Binary and Structured Log 333 | *.binlog 334 | 335 | # NVidia Nsight GPU debugger configuration file 336 | *.nvuser 337 | 338 | # MFractors (Xamarin productivity tool) working folder 339 | .mfractor/ 340 | 341 | # Local History for Visual Studio 342 | .localhistory/ 343 | 344 | # BeatPulse healthcheck temp database 345 | healthchecksdb 346 | 347 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 348 | MigrationBackup/ 349 | 350 | # Ionide (cross platform F# VS Code tools) working folder 351 | .ionide/ 352 | -------------------------------------------------------------------------------- /chpe_exe/chpe_exe.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | ARM64 7 | 8 | 9 | Release 10 | ARM64 11 | 12 | 13 | Debug 14 | ARM64EC 15 | 16 | 17 | Release 18 | ARM64EC 19 | 20 | 21 | Debug 22 | CHPE 23 | 24 | 25 | Release 26 | CHPE 27 | 28 | 29 | Debug 30 | Win32 31 | 32 | 33 | Release 34 | Win32 35 | 36 | 37 | Debug 38 | x64 39 | 40 | 41 | Release 42 | x64 43 | 44 | 45 | 46 | 16.0 47 | Win32Proj 48 | {29c1a988-d8be-4b73-9034-e795462d7910} 49 | chpeexe 50 | 10.0 51 | $(Version_Number) 52 | 53 | 54 | 55 | Application 56 | true 57 | v142 58 | Unicode 59 | 60 | 61 | Application 62 | false 63 | v142 64 | true 65 | Unicode 66 | 67 | 68 | Application 69 | true 70 | v142 71 | Unicode 72 | 73 | 74 | Application 75 | false 76 | v142 77 | true 78 | Unicode 79 | 80 | 81 | Application 82 | true 83 | v142 84 | Unicode 85 | 86 | 87 | Application 88 | false 89 | v142 90 | true 91 | Unicode 92 | 93 | 94 | Application 95 | true 96 | v142 97 | Unicode 98 | 99 | 100 | Application 101 | false 102 | v142 103 | true 104 | Unicode 105 | 106 | 107 | Application 108 | true 109 | v142 110 | Unicode 111 | 112 | 113 | Application 114 | false 115 | v142 116 | true 117 | Unicode 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | true 157 | 158 | 159 | false 160 | 161 | 162 | true 163 | true 164 | 165 | 166 | false 167 | true 168 | 169 | 170 | true 171 | $(SolutionDir)$(Platform)\$(Configuration)\ 172 | $(Platform)\$(Configuration)\ 173 | 174 | 175 | false 176 | $(SolutionDir)$(Platform)\$(Configuration)\ 177 | $(Platform)\$(Configuration)\ 178 | 179 | 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | true 187 | 188 | 189 | false 190 | 191 | 192 | 193 | Level4 194 | true 195 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 196 | true 197 | stdcpp17 198 | 199 | 200 | Console 201 | true 202 | 203 | 204 | 205 | 206 | Level4 207 | true 208 | true 209 | true 210 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 211 | true 212 | stdcpp17 213 | 214 | 215 | Console 216 | true 217 | true 218 | true 219 | 220 | 221 | 222 | 223 | Level4 224 | true 225 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 226 | true 227 | stdcpp17 228 | 229 | 230 | Console 231 | true 232 | softintrin.lib;%(AdditionalDependencies) 233 | 234 | 235 | 236 | 237 | Level4 238 | true 239 | true 240 | true 241 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 242 | true 243 | stdcpp17 244 | 245 | 246 | Console 247 | true 248 | true 249 | true 250 | softintrin.lib;%(AdditionalDependencies) 251 | 252 | 253 | 254 | 255 | Level4 256 | true 257 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 258 | true 259 | Disabled 260 | ProgramDatabase 261 | false 262 | stdcpp17 263 | 264 | 265 | Console 266 | true 267 | kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib 268 | 269 | 270 | 271 | 272 | Level4 273 | true 274 | true 275 | true 276 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 277 | true 278 | stdcpp17 279 | 280 | 281 | Console 282 | true 283 | true 284 | true 285 | kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib 286 | 287 | 288 | 289 | 290 | Level4 291 | true 292 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 293 | true 294 | stdcpp17 295 | 296 | 297 | Console 298 | true 299 | 300 | 301 | 302 | 303 | Level4 304 | true 305 | true 306 | true 307 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 308 | true 309 | stdcpp17 310 | 311 | 312 | Console 313 | true 314 | true 315 | true 316 | 317 | 318 | 319 | 320 | Level4 321 | true 322 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 323 | true 324 | stdcpp17 325 | 326 | 327 | Console 328 | true 329 | 330 | 331 | 332 | 333 | Level4 334 | true 335 | true 336 | true 337 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 338 | true 339 | stdcpp17 340 | 341 | 342 | Console 343 | true 344 | true 345 | true 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | -------------------------------------------------------------------------------- /chpe_dll/chpe_dll.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | ARM64 7 | 8 | 9 | Release 10 | ARM64 11 | 12 | 13 | Debug 14 | ARM64EC 15 | 16 | 17 | Release 18 | ARM64EC 19 | 20 | 21 | Debug 22 | CHPE 23 | 24 | 25 | Release 26 | CHPE 27 | 28 | 29 | Debug 30 | Win32 31 | 32 | 33 | Release 34 | Win32 35 | 36 | 37 | Debug 38 | x64 39 | 40 | 41 | Release 42 | x64 43 | 44 | 45 | 46 | 16.0 47 | Win32Proj 48 | {ac996c50-0916-4751-9300-0b221c7456bd} 49 | chpedll 50 | 10.0 51 | $(Version_Number) 52 | 53 | 54 | 55 | DynamicLibrary 56 | true 57 | v142 58 | Unicode 59 | 60 | 61 | DynamicLibrary 62 | false 63 | v142 64 | true 65 | Unicode 66 | 67 | 68 | DynamicLibrary 69 | true 70 | v142 71 | Unicode 72 | 73 | 74 | DynamicLibrary 75 | false 76 | v142 77 | true 78 | Unicode 79 | 80 | 81 | DynamicLibrary 82 | true 83 | v142 84 | Unicode 85 | 86 | 87 | DynamicLibrary 88 | false 89 | v142 90 | true 91 | Unicode 92 | 93 | 94 | DynamicLibrary 95 | true 96 | v142 97 | Unicode 98 | 99 | 100 | DynamicLibrary 101 | false 102 | v142 103 | true 104 | Unicode 105 | 106 | 107 | DynamicLibrary 108 | true 109 | v142 110 | Unicode 111 | 112 | 113 | DynamicLibrary 114 | false 115 | v142 116 | true 117 | Unicode 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | true 157 | 158 | 159 | false 160 | 161 | 162 | true 163 | true 164 | 165 | 166 | false 167 | true 168 | 169 | 170 | true 171 | $(SolutionDir)$(Platform)\$(Configuration)\ 172 | $(Platform)\$(Configuration)\ 173 | 174 | 175 | false 176 | $(SolutionDir)$(Platform)\$(Configuration)\ 177 | $(Platform)\$(Configuration)\ 178 | 179 | 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | true 187 | 188 | 189 | false 190 | 191 | 192 | 193 | Level4 194 | true 195 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 196 | true 197 | 198 | 199 | Windows 200 | true 201 | false 202 | chpe_dll.def 203 | 204 | 205 | 206 | 207 | Level4 208 | true 209 | true 210 | true 211 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 212 | true 213 | 214 | 215 | Windows 216 | true 217 | true 218 | true 219 | false 220 | chpe_dll.def 221 | 222 | 223 | 224 | 225 | Level4 226 | true 227 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 228 | true 229 | 230 | 231 | Windows 232 | true 233 | false 234 | chpe_dll.def 235 | softintrin.lib;%(AdditionalDependencies) 236 | 237 | 238 | 239 | 240 | Level4 241 | true 242 | true 243 | true 244 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 245 | true 246 | 247 | 248 | Windows 249 | true 250 | true 251 | true 252 | false 253 | chpe_dll.def 254 | softintrin.lib;%(AdditionalDependencies) 255 | 256 | 257 | 258 | 259 | Level4 260 | true 261 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 262 | true 263 | Disabled 264 | ProgramDatabase 265 | false 266 | 267 | 268 | Windows 269 | true 270 | false 271 | chpe_dll.def 272 | kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib 273 | /NOIMPLIB %(AdditionalOptions) 274 | 275 | 276 | 277 | 278 | Level4 279 | true 280 | true 281 | true 282 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 283 | true 284 | 285 | 286 | Windows 287 | true 288 | true 289 | true 290 | false 291 | chpe_dll.def 292 | kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib 293 | /NOIMPLIB %(AdditionalOptions) 294 | 295 | 296 | 297 | 298 | Level4 299 | true 300 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 301 | true 302 | 303 | 304 | Windows 305 | true 306 | false 307 | chpe_dll.def 308 | 309 | 310 | 311 | 312 | Level4 313 | true 314 | true 315 | true 316 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 317 | true 318 | 319 | 320 | Windows 321 | true 322 | true 323 | true 324 | false 325 | chpe_dll.def 326 | 327 | 328 | 329 | 330 | Level4 331 | true 332 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 333 | true 334 | 335 | 336 | Windows 337 | true 338 | false 339 | chpe_dll.def 340 | 341 | 342 | 343 | 344 | Level4 345 | true 346 | true 347 | true 348 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 349 | true 350 | 351 | 352 | Windows 353 | true 354 | true 355 | true 356 | false 357 | chpe_dll.def 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | --------------------------------------------------------------------------------