├── .gitignore
├── LICENSE.md
├── README.md
└── Source
├── Reloaded.Core.Bootstrap.Example
├── Reloaded.Core.Bootstrap.Example.cpp
├── Reloaded.Core.Bootstrap.Example.vcxproj
└── Reloaded.Core.Bootstrap.Example.vcxproj.filters
├── Reloaded.Core.Bootstrap.ExampleDll
├── Hello.cs
└── Reloaded.Core.Bootstrap.ExampleDll.csproj
├── Reloaded.Core.Bootstrap.sln
└── Reloaded.Core.Bootstrap
├── CoreCLR.cpp
├── CoreCLR.hpp
├── Reloaded.Core.Bootstrap.rc
├── Reloaded.Core.Bootstrap.vcxproj
├── Reloaded.Core.Bootstrap.vcxproj.filters
├── core-setup
├── coreclr_delegates.h
└── hostfxr.h
├── dllmain.cpp
├── framework.h
├── nethost
├── Readme.md
├── nethost.h
├── x64-libs
│ ├── nethost.dll
│ └── nethost.lib
└── x86-libs
│ ├── nethost.dll
│ └── nethost.lib
├── pch.cpp
├── pch.h
└── resource.h
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | build/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 |
83 | # Visual Studio profiler
84 | *.psess
85 | *.vsp
86 | *.vspx
87 | *.sap
88 |
89 | # TFS 2012 Local Workspace
90 | $tf/
91 |
92 | # Guidance Automation Toolkit
93 | *.gpState
94 |
95 | # ReSharper is a .NET coding add-in
96 | _ReSharper*/
97 | *.[Rr]e[Ss]harper
98 | *.DotSettings.user
99 |
100 | # JustCode is a .NET coding add-in
101 | .JustCode
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | _NCrunch_*
111 | .*crunch*.local.xml
112 | nCrunchTemp_*
113 |
114 | # MightyMoose
115 | *.mm.*
116 | AutoTest.Net/
117 |
118 | # Web workbench (sass)
119 | .sass-cache/
120 |
121 | # Installshield output folder
122 | [Ee]xpress/
123 |
124 | # DocProject is a documentation generator add-in
125 | DocProject/buildhelp/
126 | DocProject/Help/*.HxT
127 | DocProject/Help/*.HxC
128 | DocProject/Help/*.hhc
129 | DocProject/Help/*.hhk
130 | DocProject/Help/*.hhp
131 | DocProject/Help/Html2
132 | DocProject/Help/html
133 |
134 | # Click-Once directory
135 | publish/
136 |
137 | # Publish Web Output
138 | *.[Pp]ublish.xml
139 | *.azurePubxml
140 | # TODO: Comment the next line if you want to checkin your web deploy settings
141 | # but database connection strings (with potential passwords) will be unencrypted
142 | *.pubxml
143 | *.publishproj
144 |
145 | # NuGet Packages
146 | *.nupkg
147 | # The packages folder can be ignored because of Package Restore
148 | **/packages/*
149 | # except build/, which is used as an MSBuild target.
150 | !**/packages/build/
151 | # Uncomment if necessary however generally it will be regenerated when needed
152 | #!**/packages/repositories.config
153 |
154 | # Windows Azure Build Output
155 | csx/
156 | *.build.csdef
157 |
158 | # Windows Store app package directory
159 | AppPackages/
160 |
161 | # Visual Studio cache files
162 | # files ending in .cache can be ignored
163 | *.[Cc]ache
164 | # but keep track of directories ending in .cache
165 | !*.[Cc]ache/
166 |
167 | # Others
168 | ClientBin/
169 | [Ss]tyle[Cc]op.*
170 | ~$*
171 | *~
172 | *.dbmdl
173 | *.dbproj.schemaview
174 | *.pfx
175 | *.publishsettings
176 | node_modules/
177 | orleans.codegen.cs
178 |
179 | # RIA/Silverlight projects
180 | Generated_Code/
181 |
182 | # Backup & report files from converting an old project file
183 | # to a newer Visual Studio version. Backup files are not needed,
184 | # because we have git ;-)
185 | _UpgradeReport_Files/
186 | Backup*/
187 | UpgradeLog*.XML
188 | UpgradeLog*.htm
189 |
190 | # SQL Server files
191 | *.mdf
192 | *.ldf
193 |
194 | # Business Intelligence projects
195 | *.rdl.data
196 | *.bim.layout
197 | *.bim_*.settings
198 |
199 | # Microsoft Fakes
200 | FakesAssemblies/
201 |
202 | # Node.js Tools for Visual Studio
203 | .ntvs_analysis.dat
204 |
205 | # Visual Studio 6 build log
206 | *.plg
207 |
208 | # Visual Studio 6 workspace options file
209 | *.opt
210 |
211 | # Visual Studio LightSwitch build output
212 | **/*.HTMLClient/GeneratedArtifacts
213 | **/*.DesktopClient/GeneratedArtifacts
214 | **/*.DesktopClient/ModelManifest.xml
215 | **/*.Server/GeneratedArtifacts
216 | **/*.Server/ModelManifest.xml
217 | _Pvt_Extensions
218 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2019 Sewer56
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Reloaded.Core.Bootstrap
2 |
3 | Reloaded.Core.Bootstrap is a tiny Visual C++ library wrapping the `nethost` library that allows you to inject CoreCLR (the .NET Core Runtime) into the current unmanaged process and execute a .NET library.
4 |
5 | ## Requirements
6 |
7 | ### Building
8 | - Visual Studio 2019 or newer (2017 may work, not tested).
9 | - .NET Core 3 Preview 6 SDK (or newer).
10 |
11 | ### Running
12 | - Requires .NET Core 3 Preview 6 Runtime or newer.
13 |
14 | Logically, the x86 runtime is necessary to host CoreCLR in an x86 process and the x64 runtime is necessary to run CoreCLR in an x64 process.
15 |
16 | The "Hosting Bundle" contains both the x86 and x64 runtime.
17 |
18 | ## Example Usage
19 |
20 | See the Visual Studio solution file under the `Source` directory, it contains a usage example from both the native C++ and managed C# side.
21 |
22 | ## How does it work (Summary)
23 |
24 | The project uses the `nethost` library provided by CoreCLR (the .NET Core Runtime) in order to locate the `hostfxr` library.
25 |
26 | We then load the `hostfxr` library and obtain function addresses from hostfxr's DLL Exports.
27 |
28 | Using exports we load CoreCLR by providing a path to the runtime configuration JSON file. The loaded CoreCLR is then asked for a function (pointer) used to load an assembly and obtain function pointer of .NET function.
29 |
30 | For a more comprehensive description, refer to the official guide for .NET Core hosting: https://docs.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting
31 |
32 |
33 | ## Operating System Support
34 |
35 | Like the other libraries in this organization, this library was made with [Reloaded II](https://github.com/Reloaded-Project/Reloaded-II) in mind and thus provides a Windows-only implementation.
36 |
37 | That said it is very easy to extend this to Linux and OSX with less than 50 lines of code. I, the author just lack the resources (time) to learn alternative tooling/build systems *(CMake/Premake etc.)* and make a solution that can be built and tested on more platforms.
38 |
39 | ## Troubleshooting
40 |
41 | ### No runtime configuration (runtimeconfig.json) generated on build of .NET project.
42 |
43 | It means that you are probably building a class library project (as opposed to console application) that you would like to execute.
44 |
45 | To generate the config for a class library project, enable dynamic loading by adding
46 | `true` to the first property group of your .NET project's `.csproj` files.
47 |
48 | ## Additional Licenses
49 |
50 | `nethost, hostfxr & coreclr_delegates`:
51 |
52 | ```
53 | // Licensed to the .NET Foundation under one or more agreements.
54 | // The .NET Foundation licenses this file to you under the MIT license.
55 | // See the LICENSE file in the project root for more information.
56 | ```
57 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.Example/Reloaded.Core.Bootstrap.Example.cpp:
--------------------------------------------------------------------------------
1 | // Reloaded.Core.Bootstrap.Example.cpp : This file contains the 'main' function. Program execution begins and ends there.
2 | //
3 |
4 | #include
5 | #include
6 | #include "CoreCLR.hpp"
7 | #include
8 | #include "framework.h"
9 |
10 | // Global variables.
11 | CoreCLR* CLR;
12 |
13 | // Forward declarations
14 | string_t get_current_directory();
15 | bool file_exists(string_t file_path);
16 | int exit(const char* message);
17 |
18 | // Rest of code.
19 | int main(int argc, char* argv[])
20 | {
21 | int success = 0;
22 | CLR = new CoreCLR(&success);
23 |
24 | if (! success)
25 | return exit("Failed to load `hostfxr`");
26 |
27 | // Get file paths and verify them.
28 | const string_t current_directory = get_current_directory();
29 | const string_t runtime_config_path = current_directory + L"Reloaded.Core.Bootstrap.ExampleDll.runtimeconfig.json";
30 |
31 | if (!file_exists(runtime_config_path))
32 | return exit("The runtime configuration does not exist. Ensure you have compiled the Reloaded.Core.Bootstrap.ExampleDll project.");
33 |
34 | // Load runtime and execute our method.
35 | if (! CLR->load_runtime(runtime_config_path))
36 | return exit("Failed to load .NET Core Runtime");
37 |
38 | const string_t assembly_path = current_directory + L"Reloaded.Core.Bootstrap.ExampleDll.dll";
39 | const string_t type_name = L"Reloaded.Core.Bootstrap.ExampleDll.Hello, Reloaded.Core.Bootstrap.ExampleDll";
40 | const string_t method_name = L"SayHello";
41 |
42 | const string_t hello_message = L"Hello NET Core from C++";
43 | component_entry_point_fn say_hello = nullptr;
44 |
45 | if (!CLR->load_assembly_and_get_function_pointer(assembly_path.c_str(), type_name.c_str(), method_name.c_str(),
46 | nullptr, nullptr, (void**)&say_hello))
47 |
48 | return exit("Failed to load C# assembly.");
49 |
50 | int message_size = hello_message.length();
51 | say_hello((void*)hello_message.c_str(), message_size);
52 | }
53 |
54 | bool file_exists(string_t file_path)
55 | {
56 | std::ifstream file_stream;
57 | file_stream.open(file_path);
58 | return file_stream.good();
59 | }
60 |
61 | string_t get_current_directory()
62 | {
63 | char_t host_path[MAX_PATH];
64 | int bufferSize = sizeof(host_path) / sizeof(char_t);
65 | GetModuleFileNameW(NULL, host_path, bufferSize);
66 |
67 | string_t root_path = host_path;
68 | auto pos = root_path.find_last_of('\\');
69 | root_path = root_path.substr(0, pos + 1);
70 |
71 | return root_path;
72 | }
73 |
74 | int exit(const char* message)
75 | {
76 | std::cerr << message << std::endl;
77 | return -1;
78 | }
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.Example/Reloaded.Core.Bootstrap.Example.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}
24 | Win32Proj
25 | ReloadedCoreBootstrapExample
26 | 10.0
27 |
28 |
29 |
30 | Application
31 | true
32 | v142
33 | Unicode
34 |
35 |
36 | Application
37 | false
38 | v142
39 | true
40 | Unicode
41 |
42 |
43 | Application
44 | true
45 | v142
46 | Unicode
47 |
48 |
49 | Application
50 | false
51 | v142
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | true
75 | ..\Reloaded.Core.Bootstrap;$(IncludePath)
76 | $(SolutionDir)\$(Configuration)\$(Platform)\example\
77 |
78 |
79 | true
80 | ..\Reloaded.Core.Bootstrap;$(IncludePath)
81 | $(SolutionDir)\$(Configuration)\$(Platform)\example\
82 |
83 |
84 | false
85 | ..\Reloaded.Core.Bootstrap;$(IncludePath)
86 | $(SolutionDir)\$(Configuration)\$(Platform)\example\
87 |
88 |
89 | false
90 | ..\Reloaded.Core.Bootstrap;$(IncludePath)
91 | $(SolutionDir)\$(Configuration)\$(Platform)\example\
92 |
93 |
94 |
95 |
96 |
97 | Level3
98 | Disabled
99 | true
100 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
101 | true
102 | MultiThreadedDebug
103 |
104 |
105 | Console
106 | true
107 |
108 |
109 |
110 |
111 |
112 |
113 | Level3
114 | Disabled
115 | true
116 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
117 | true
118 | MultiThreadedDebug
119 |
120 |
121 | Console
122 | true
123 |
124 |
125 |
126 |
127 |
128 |
129 | Level3
130 | MaxSpeed
131 | true
132 | true
133 | true
134 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
135 | true
136 | MultiThreaded
137 |
138 |
139 | Console
140 | true
141 | true
142 | true
143 |
144 |
145 |
146 |
147 |
148 |
149 | Level3
150 | MaxSpeed
151 | true
152 | true
153 | true
154 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
155 | true
156 | MultiThreaded
157 |
158 |
159 | Console
160 | true
161 | true
162 | true
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | {992ab7a3-f0c7-4276-b83c-380d99f5f9e9}
171 | false
172 |
173 |
174 |
175 |
176 |
177 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.Example/Reloaded.Core.Bootstrap.Example.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;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 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.ExampleDll/Hello.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Reflection;
4 | using System.Runtime.InteropServices;
5 | using System.Runtime.Versioning;
6 |
7 | namespace Reloaded.Core.Bootstrap.ExampleDll
8 | {
9 | public static class Hello
10 | {
11 | public static int SayHello(IntPtr stringPtr, int size)
12 | {
13 | string message = Marshal.PtrToStringUni(stringPtr, size);
14 | Console.WriteLine($"Message: {message}, Architecture: {GetArchitecture()}, NET Core Version: {GetRuntimeVersion()}");
15 | return 0;
16 | }
17 |
18 | private static string GetRuntimeVersion()
19 | {
20 | string framework = Assembly.GetExecutingAssembly()?.GetCustomAttribute()?.FrameworkName;
21 | return framework;
22 | }
23 |
24 | private static string GetArchitecture()
25 | {
26 | switch (IntPtr.Size)
27 | {
28 | case 4:
29 | return "x86";
30 | case 8:
31 | return "x64";
32 | default:
33 | return "The future is now";
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.ExampleDll/Reloaded.Core.Bootstrap.ExampleDll.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0
5 | false
6 | true
7 | x86;x64
8 |
9 |
10 |
11 | ..\Debug\Win32\example\
12 | AnyCPU
13 |
14 |
15 |
16 | ..\Debug\x64\example\
17 | AnyCPU
18 |
19 |
20 |
21 | ..\Release\Win32\example\
22 | AnyCPU
23 |
24 |
25 |
26 | ..\Release\x64\example\
27 | AnyCPU
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29006.145
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Reloaded.Core.Bootstrap.Example", "Reloaded.Core.Bootstrap.Example\Reloaded.Core.Bootstrap.Example.vcxproj", "{41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {29469C33-3AAA-49C9-9581-422A15B6D244} = {29469C33-3AAA-49C9-9581-422A15B6D244}
9 | EndProjectSection
10 | EndProject
11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Reloaded.Core.Bootstrap", "Reloaded.Core.Bootstrap\Reloaded.Core.Bootstrap.vcxproj", "{992AB7A3-F0C7-4276-B83C-380D99F5F9E9}"
12 | EndProject
13 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reloaded.Core.Bootstrap.ExampleDll", "Reloaded.Core.Bootstrap.ExampleDll\Reloaded.Core.Bootstrap.ExampleDll.csproj", "{29469C33-3AAA-49C9-9581-422A15B6D244}"
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|x64 + AnyCPU = Debug|x64 + AnyCPU
18 | Debug|x86 + AnyCPU = Debug|x86 + AnyCPU
19 | Release|x64 + AnyCPU = Release|x64 + AnyCPU
20 | Release|x86 + AnyCPU = Release|x86 + AnyCPU
21 | EndGlobalSection
22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Debug|x64 + AnyCPU.ActiveCfg = Debug|x64
24 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Debug|x64 + AnyCPU.Build.0 = Debug|x64
25 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Debug|x86 + AnyCPU.ActiveCfg = Debug|Win32
26 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Debug|x86 + AnyCPU.Build.0 = Debug|Win32
27 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Release|x64 + AnyCPU.ActiveCfg = Release|x64
28 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Release|x64 + AnyCPU.Build.0 = Release|x64
29 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Release|x86 + AnyCPU.ActiveCfg = Release|Win32
30 | {41AD91BE-6D90-45DE-8A80-2A72DE4A6B40}.Release|x86 + AnyCPU.Build.0 = Release|Win32
31 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Debug|x64 + AnyCPU.ActiveCfg = Debug|x64
32 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Debug|x64 + AnyCPU.Build.0 = Debug|x64
33 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Debug|x86 + AnyCPU.ActiveCfg = Debug|Win32
34 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Debug|x86 + AnyCPU.Build.0 = Debug|Win32
35 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Release|x64 + AnyCPU.ActiveCfg = Release|x64
36 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Release|x64 + AnyCPU.Build.0 = Release|x64
37 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Release|x86 + AnyCPU.ActiveCfg = Release|Win32
38 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}.Release|x86 + AnyCPU.Build.0 = Release|Win32
39 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Debug|x64 + AnyCPU.ActiveCfg = Debug|x64
40 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Debug|x64 + AnyCPU.Build.0 = Debug|x64
41 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Debug|x86 + AnyCPU.ActiveCfg = Debug|x86
42 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Debug|x86 + AnyCPU.Build.0 = Debug|x86
43 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Release|x64 + AnyCPU.ActiveCfg = Release|x64
44 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Release|x64 + AnyCPU.Build.0 = Release|x64
45 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Release|x86 + AnyCPU.ActiveCfg = Release|x86
46 | {29469C33-3AAA-49C9-9581-422A15B6D244}.Release|x86 + AnyCPU.Build.0 = Release|x86
47 | EndGlobalSection
48 | GlobalSection(SolutionProperties) = preSolution
49 | HideSolutionNode = FALSE
50 | EndGlobalSection
51 | GlobalSection(ExtensibilityGlobals) = postSolution
52 | SolutionGuid = {A57EDBA2-0840-4B56-AE9C-14A90050DF42}
53 | EndGlobalSection
54 | EndGlobal
55 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/CoreCLR.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "CoreCLR.hpp"
3 | #include
4 |
5 | CoreCLR::CoreCLR(int* success)
6 | {
7 | if (load_hostfxr())
8 | *success = 1;
9 |
10 | success = 0;
11 | }
12 |
13 | /* Core public functions */
14 | bool CoreCLR::load_hostfxr()
15 | {
16 | // Get the path to CoreCLR's hostfxr
17 | char_t buffer[MAX_PATH];
18 | size_t buffer_size = sizeof(buffer) / sizeof(char_t);
19 | int rc = get_hostfxr_path(buffer, &buffer_size, NULL);
20 | if (rc != 0)
21 | return false;
22 |
23 | // Load hostfxr and get desired exports
24 | void* lib = load_library(buffer);
25 | m_init_fptr = (hostfxr_initialize_for_runtime_config_fn)get_export(lib, "hostfxr_initialize_for_runtime_config");
26 | m_get_delegate_fptr = (hostfxr_get_runtime_delegate_fn)get_export(lib, "hostfxr_get_runtime_delegate");
27 | m_close_fptr = (hostfxr_close_fn)get_export(lib, "hostfxr_close");
28 |
29 | return (m_init_fptr && m_get_delegate_fptr && m_close_fptr);
30 | }
31 |
32 | bool CoreCLR::load_runtime(const string_t runtime_config_path)
33 | {
34 | m_load_assembly_and_get_function_pointer = get_dotnet_load_assembly(runtime_config_path.c_str());
35 | return m_load_assembly_and_get_function_pointer != nullptr;
36 | }
37 |
38 | bool CoreCLR::load_assembly_and_get_function_pointer(const char_t* assembly_path, const char_t* type_name,
39 | const char_t* method_name, const char_t* delegate_type_name, void* reserved, void** delegate)
40 | {
41 | int result = m_load_assembly_and_get_function_pointer(assembly_path, type_name, method_name, delegate_type_name, reserved, delegate);
42 | return (result == 0 && delegate != nullptr);
43 | };
44 |
45 |
46 | /* Helpers */
47 | void* CoreCLR::load_library(const char_t* path)
48 | {
49 | HMODULE handle = LoadLibraryW(path);
50 | return static_cast(handle);
51 | }
52 |
53 | void* CoreCLR::get_export(void* h, const char* name)
54 | {
55 | void* f = GetProcAddress((HMODULE)h, name);
56 | return f;
57 | }
58 |
59 | load_assembly_and_get_function_pointer_fn CoreCLR::get_dotnet_load_assembly(const char_t* config_path)
60 | {
61 | // Load .NET Core
62 | hostfxr_handle context = nullptr;
63 | int rc = m_init_fptr(config_path, nullptr, &context);
64 | if (rc != 0 || context == nullptr)
65 | {
66 | m_close_fptr(context);
67 | return nullptr;
68 | }
69 |
70 | // Get the load assembly function pointer
71 | m_get_delegate_fptr(context, hdt_load_assembly_and_get_function_pointer, (void**)&m_load_assembly_and_get_function_pointer);
72 | m_close_fptr(context);
73 | return (load_assembly_and_get_function_pointer_fn) m_load_assembly_and_get_function_pointer;
74 | }
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/CoreCLR.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "./nethost/nethost.h"
5 | #include "core-setup/hostfxr.h"
6 | #include "core-setup/coreclr_delegates.h"
7 | using string_t = std::basic_string;
8 |
9 | class CoreCLR
10 | {
11 | public:
12 |
13 | /**
14 | * \param success This value returns 1 if the constructor has successfully ran, else 0.
15 | */
16 | CoreCLR(int* success);
17 | ~CoreCLR() = default;
18 |
19 | /**
20 | * \brief Initializes and starts the .NET Core runtime.
21 | * \param runtime_config_path The full path to the runtimeconfig file for the assembly to be loaded *.runtimeconfig.json
22 | * \return True if the operation succeeded, else false.
23 | */
24 | bool load_runtime(const string_t runtime_config_path);
25 |
26 | /**
27 | * \param assembly_path Fully qualified path to assembly.
28 | * \param type_name Assembly qualified type name. e.g. "DotNetLib.Lib, DotNetLib"
29 | * \param method_name e.g. "Hello"
30 | * \param delegate_type_name Assembly qualified delegate type name or null.
31 | * \param reserved Extensibility parameter (currently unused and must be 0).
32 | * \param delegate Pointer where to store the function pointer result. (i.e. This is a delegate representing the NET Core function)
33 | * \return True if the operation succeeded, else false.
34 | */
35 | bool load_assembly_and_get_function_pointer(const char_t* assembly_path, const char_t* type_name, const char_t* method_name, const char_t* delegate_type_name, void* reserved, void** delegate);
36 |
37 | private:
38 | /* HostFXR delegates. */
39 | hostfxr_initialize_for_runtime_config_fn m_init_fptr{};
40 | hostfxr_get_runtime_delegate_fn m_get_delegate_fptr{};
41 | hostfxr_close_fn m_close_fptr{};
42 | load_assembly_and_get_function_pointer_fn m_load_assembly_and_get_function_pointer = nullptr;
43 |
44 | /* Helper functions. */
45 | void* load_library(const char_t* path);
46 | void* get_export(void* h, const char* name);
47 | load_assembly_and_get_function_pointer_fn get_dotnet_load_assembly(const char_t* config_path);
48 |
49 | /** Using the nethost library, discovers the location of hostfxr and retrieves function exports. */
50 | bool load_hostfxr();
51 | };
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/Reloaded.Core.Bootstrap.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Reloaded-Project/Reloaded.Core.Bootstrap/1e6c73c4228c4039493b6cef678914288a16f8cb/Source/Reloaded.Core.Bootstrap/Reloaded.Core.Bootstrap.rc
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/Reloaded.Core.Bootstrap.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | {992AB7A3-F0C7-4276-B83C-380D99F5F9E9}
24 | Win32Proj
25 | ReloadedCoreBootstrap
26 | 10.0
27 |
28 |
29 |
30 | StaticLibrary
31 | true
32 | v142
33 | Unicode
34 |
35 |
36 | StaticLibrary
37 | false
38 | v142
39 | true
40 | Unicode
41 |
42 |
43 | StaticLibrary
44 | true
45 | v142
46 | Unicode
47 |
48 |
49 | StaticLibrary
50 | false
51 | v142
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | true
75 | $(SolutionDir)\$(Configuration)\$(Platform)\lib\
76 |
77 |
78 | true
79 | $(SolutionDir)\$(Configuration)\$(Platform)\lib\
80 |
81 |
82 | false
83 | $(SolutionDir)\$(Configuration)\$(Platform)\lib\
84 |
85 |
86 | false
87 | $(SolutionDir)\$(Configuration)\$(Platform)\lib\
88 |
89 |
90 |
91 | Use
92 | Level3
93 | Disabled
94 | true
95 | WIN32;_DEBUG;RELOADEDCOREBOOTSTRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
96 | true
97 | pch.h
98 | MultiThreadedDebug
99 |
100 |
101 | Windows
102 | true
103 | false
104 |
105 |
106 | .\nethost\x86-libs;%(AdditionalLibraryDirectories)
107 | %(AdditionalDependencies)
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | Use
117 | Level3
118 | Disabled
119 | true
120 | _DEBUG;RELOADEDCOREBOOTSTRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
121 | true
122 | pch.h
123 | MultiThreadedDebug
124 |
125 |
126 | Windows
127 | true
128 | false
129 |
130 |
131 | .\nethost\x64-libs;%(AdditionalLibraryDirectories)
132 | %(AdditionalDependencies)
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | Use
142 | Level3
143 | MaxSpeed
144 | true
145 | true
146 | true
147 | WIN32;NDEBUG;RELOADEDCOREBOOTSTRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
148 | true
149 | pch.h
150 | MultiThreaded
151 |
152 |
153 | Windows
154 | true
155 | true
156 | true
157 | false
158 |
159 |
160 | .\nethost\x86-libs;%(AdditionalLibraryDirectories)
161 | %(AdditionalDependencies)
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | Use
171 | Level3
172 | MaxSpeed
173 | true
174 | true
175 | true
176 | NDEBUG;RELOADEDCOREBOOTSTRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
177 | true
178 | pch.h
179 | MultiThreaded
180 |
181 |
182 | Windows
183 | true
184 | true
185 | true
186 | false
187 |
188 |
189 | .\nethost\x64-libs;%(AdditionalLibraryDirectories)
190 | %(AdditionalDependencies)
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | Create
211 | Create
212 | Create
213 | Create
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 | PreserveNewest
222 | nethost.dll
223 |
224 |
225 |
226 |
227 | PreserveNewest
228 | nethost.dll
229 |
230 |
231 |
232 |
233 | Document
234 | true
235 | true
236 | false
237 | false
238 |
239 |
240 | true
241 | true
242 | false
243 | false
244 |
245 |
246 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/Reloaded.Core.Bootstrap.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {0a4ee89c-689e-404f-90cf-7dab64b107c0}
14 |
15 |
16 | {7635ecd4-4d9b-438c-8d90-1f515bc70f0d}
17 |
18 |
19 | {088f2ff1-d9f9-4461-8c24-31c1ffd3d7f8}
20 |
21 |
22 | {d7ac0fc8-5ea1-4759-af58-cc04f1eb3535}
23 |
24 |
25 | {fd5aabf8-e7f3-4be7-b7a9-47cff872dfe2}
26 |
27 |
28 | {7fa8ce8f-dac7-429e-9b42-29806eec32aa}
29 |
30 |
31 |
32 |
33 | Header Files
34 |
35 |
36 | Header Files\project-template
37 |
38 |
39 | Header Files\project-template
40 |
41 |
42 | Header Files\project-template
43 |
44 |
45 | Header Files\core-setup
46 |
47 |
48 | Header Files\core-setup
49 |
50 |
51 | Header Files
52 |
53 |
54 |
55 |
56 | Source Files
57 |
58 |
59 | Source Files\project-template
60 |
61 |
62 | Source Files\project-template
63 |
64 |
65 |
66 |
67 | Header Files\nethost\x86-libs
68 |
69 |
70 | Header Files\nethost\x64-libs
71 |
72 |
73 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/core-setup/coreclr_delegates.h:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | #ifndef __CORECLR_DELEGATES_H__
6 | #define __CORECLR_DELEGATES_H__
7 |
8 | #include
9 |
10 | #if defined(_WIN32)
11 | #define CORECLR_DELEGATE_CALLTYPE __stdcall
12 | #ifdef _WCHAR_T_DEFINED
13 | typedef wchar_t char_t;
14 | #else
15 | typedef unsigned short char_t;
16 | #endif
17 | #else
18 | #define CORECLR_DELEGATE_CALLTYPE
19 | typedef char char_t;
20 | #endif
21 |
22 | // Signature of delegate returned by coreclr_delegate_type::load_assembly_and_get_function_pointer
23 | typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_and_get_function_pointer_fn)(
24 | const char_t *assembly_path /* Fully qualified path to assembly */,
25 | const char_t *type_name /* Assembly qualified type name */,
26 | const char_t *method_name /* Public static method name compatible with delegateType */,
27 | const char_t *delegate_type_name /* Assembly qualified delegate type name or null */,
28 | void *reserved /* Extensibility parameter (currently unused and must be 0) */,
29 | /*out*/ void **delegate /* Pointer where to store the function pointer result */);
30 |
31 | // Signature of delegate returned by load_assembly_and_get_function_pointer_fn when delegate_type_name == null (default)
32 | typedef int (CORECLR_DELEGATE_CALLTYPE *component_entry_point_fn)(void *arg, int32_t arg_size_in_bytes);
33 |
34 | #endif // __CORECLR_DELEGATES_H__
35 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/core-setup/hostfxr.h:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | #ifndef __HOSTFXR_H__
6 | #define __HOSTFXR_H__
7 |
8 | #include
9 | #include
10 |
11 | #if defined(_WIN32)
12 | #define HOSTFXR_CALLTYPE __cdecl
13 | #ifdef _WCHAR_T_DEFINED
14 | typedef wchar_t char_t;
15 | #else
16 | typedef unsigned short char_t;
17 | #endif
18 | #else
19 | #define HOSTFXR_CALLTYPE
20 | typedef char char_t;
21 | #endif
22 |
23 | enum hostfxr_delegate_type
24 | {
25 | hdt_com_activation,
26 | hdt_load_in_memory_assembly,
27 | hdt_winrt_activation,
28 | hdt_com_register,
29 | hdt_com_unregister,
30 | hdt_load_assembly_and_get_function_pointer
31 | };
32 |
33 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv);
34 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_startupinfo_fn)(
35 | const int argc,
36 | const char_t **argv,
37 | const char_t *host_path,
38 | const char_t *dotnet_root,
39 | const char_t *app_path);
40 |
41 | typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message);
42 | typedef hostfxr_error_writer_fn(HOSTFXR_CALLTYPE *hostfxr_set_error_writer_fn)(hostfxr_error_writer_fn error_writer);
43 |
44 | typedef void* hostfxr_handle;
45 | typedef struct hostfxr_initialize_parameters
46 | {
47 | size_t size;
48 | const char_t *host_path;
49 | const char_t *dotnet_root;
50 | } hostfxr_initialize_parameters;
51 |
52 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)(
53 | int argc,
54 | const char_t **argv,
55 | const hostfxr_initialize_parameters *parameters,
56 | /*out*/ hostfxr_handle *host_context_handle);
57 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_runtime_config_fn)(
58 | const char_t *runtime_config_path,
59 | const hostfxr_initialize_parameters*parameters,
60 | /*out*/ hostfxr_handle *host_context_handle);
61 |
62 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_property_value_fn)(
63 | const hostfxr_handle host_context_handle,
64 | const char_t *name,
65 | /*out*/ const char_t **value);
66 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_set_runtime_property_value_fn)(
67 | const hostfxr_handle host_context_handle,
68 | const char_t *name,
69 | const char_t *value);
70 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_properties_fn)(
71 | const hostfxr_handle host_context_handle,
72 | /*inout*/ size_t * count,
73 | /*out*/ const char_t **keys,
74 | /*out*/ const char_t **values);
75 |
76 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_run_app_fn)(const hostfxr_handle host_context_handle);
77 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_delegate_fn)(
78 | const hostfxr_handle host_context_handle,
79 | enum hostfxr_delegate_type type,
80 | /*out*/ void **delegate);
81 |
82 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_close_fn)(const hostfxr_handle host_context_handle);
83 |
84 | #endif //__HOSTFXR_H__
85 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/dllmain.cpp:
--------------------------------------------------------------------------------
1 | // dllmain.cpp : Defines the entry point for the DLL application.
2 | #include "pch.h"
3 |
4 | BOOL APIENTRY DllMain( HMODULE hModule,
5 | DWORD ul_reason_for_call,
6 | LPVOID lpReserved
7 | )
8 | {
9 | switch (ul_reason_for_call)
10 | {
11 | case DLL_PROCESS_ATTACH:
12 | case DLL_THREAD_ATTACH:
13 | case DLL_THREAD_DETACH:
14 | case DLL_PROCESS_DETACH:
15 | break;
16 | }
17 | return TRUE;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/framework.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
4 | // Windows Header Files
5 | #include
6 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/Readme.md:
--------------------------------------------------------------------------------
1 | `Nethost` library obtained from:
2 |
3 | **x64:** `
4 | https://www.nuget.org/packages/runtime.win-x64.Microsoft.NETCore.DotNetAppHost/3.0.0-preview6-27804-01
5 |
6 | **x86:** `https://www.nuget.org/packages/runtime.win-x86.Microsoft.NETCore.DotNetAppHost/3.0.0-preview6-27804-01`
7 |
8 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/nethost.h:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | #ifndef __NETHOST_H__
6 | #define __NETHOST_H__
7 |
8 | #include
9 |
10 | #if defined(_WIN32)
11 | #ifdef NETHOST_EXPORT
12 | #define NETHOST_API __declspec(dllexport)
13 | #else
14 | #define NETHOST_API __declspec(dllimport)
15 | #endif
16 |
17 | #define NETHOST_CALLTYPE __stdcall
18 | #ifdef _WCHAR_T_DEFINED
19 | using char_t = wchar_t;
20 | #else
21 | using char_t = unsigned short;
22 | #endif
23 | #else
24 | #ifdef NETHOST_EXPORT
25 | #define NETHOST_API __attribute__((__visibility__("default")))
26 | #else
27 | #define NETHOST_API
28 | #endif
29 |
30 | #define NETHOST_CALLTYPE
31 | using char_t = char;
32 | #endif
33 |
34 | //
35 | // Get the path to the hostfxr library
36 | //
37 | // Parameters:
38 | // buffer
39 | // Buffer that will be populated with the hostfxr path, including a null terminator.
40 | //
41 | // buffer_size
42 | // [in] Size of buffer in char_t units.
43 | // [out] Size of buffer used in char_t units. If the input value is too small
44 | // or buffer is nullptr, this is populated with the minimum required size
45 | // in char_t units for a buffer to hold the hostfxr path
46 | //
47 | // assembly_path
48 | // Optional. Path to the compenent's assembly. Whether or not this is specified
49 | // determines the behaviour for locating the hostfxr library.
50 | // If nullptr, hostfxr is located using the enviroment variable or global registration
51 | // If specified, hostfxr is located as if the assembly_path is the apphost
52 | //
53 | // Return value:
54 | // 0 on success, otherwise failure
55 | // 0x80008098 - buffer is too small (HostApiBufferTooSmall)
56 | //
57 | // Remarks:
58 | // The full search for the hostfxr library is done on every call. To minimize the need
59 | // to call this function multiple times, pass a large buffer (e.g. PATH_MAX).
60 | //
61 | extern "C" NETHOST_API int NETHOST_CALLTYPE get_hostfxr_path(
62 | char_t * buffer,
63 | size_t * buffer_size,
64 | const char_t * assembly_path);
65 |
66 | #endif // __NETHOST_H__
67 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/x64-libs/nethost.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Reloaded-Project/Reloaded.Core.Bootstrap/1e6c73c4228c4039493b6cef678914288a16f8cb/Source/Reloaded.Core.Bootstrap/nethost/x64-libs/nethost.dll
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/x64-libs/nethost.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Reloaded-Project/Reloaded.Core.Bootstrap/1e6c73c4228c4039493b6cef678914288a16f8cb/Source/Reloaded.Core.Bootstrap/nethost/x64-libs/nethost.lib
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/x86-libs/nethost.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Reloaded-Project/Reloaded.Core.Bootstrap/1e6c73c4228c4039493b6cef678914288a16f8cb/Source/Reloaded.Core.Bootstrap/nethost/x86-libs/nethost.dll
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/nethost/x86-libs/nethost.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Reloaded-Project/Reloaded.Core.Bootstrap/1e6c73c4228c4039493b6cef678914288a16f8cb/Source/Reloaded.Core.Bootstrap/nethost/x86-libs/nethost.lib
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/pch.cpp:
--------------------------------------------------------------------------------
1 | // pch.cpp: source file corresponding to the pre-compiled header
2 |
3 | #include "pch.h"
4 |
5 | // When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
6 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/pch.h:
--------------------------------------------------------------------------------
1 | // pch.h: This is a precompiled header file.
2 | // Files listed below are compiled only once, improving build performance for future builds.
3 | // This also affects IntelliSense performance, including code completion and many code browsing features.
4 | // However, files listed here are ALL re-compiled if any one of them is updated between builds.
5 | // Do not add files here that you will be updating frequently as this negates the performance advantage.
6 |
7 | #ifndef PCH_H
8 | #define PCH_H
9 |
10 | // add headers that you want to pre-compile here
11 | #include "framework.h"
12 |
13 | #endif //PCH_H
14 |
--------------------------------------------------------------------------------
/Source/Reloaded.Core.Bootstrap/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Reloaded.Core.Bootstrap.rc
4 |
5 | // Next default values for new objects
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------