forked from dotnet/samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update HostingWithHostFxr to 5.0 (dotnet#4010)
- Loading branch information
Showing
6 changed files
with
260 additions
and
32 deletions.
There are no files selected for viewing
19 changes: 4 additions & 15 deletions
19
core/hosting/HostWithHostFxr/src/DotNetLib/DotNetLib.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<EnableDynamicLoading>true</EnableDynamicLoading> | ||
</PropertyGroup> | ||
|
||
<Target Name="SetupForDemo" | ||
AfterTargets="Build"> | ||
|
||
<ItemGroup> | ||
<AllOutputs Include="$(OutputPath)$(MSBuildProjectName).dll" /> | ||
<AllOutputs Include="$(OutputPath)$(MSBuildProjectName).pdb" /> | ||
<AllOutputs Include="$(OutputPath)$(MSBuildProjectName).runtimeconfig.json" /> | ||
<AllOutputs Include="$(OutputPath)$(MSBuildProjectName).deps.json" /> | ||
</ItemGroup> | ||
|
||
<!-- Copy the project outputs to the demo directory --> | ||
<Copy SourceFiles="@(AllOutputs)" | ||
DestinationFolder="$(BinRoot)/$(Configuration)" /> | ||
</Target> | ||
<PropertyGroup> | ||
<OutputPath>$(BinRoot)/$(Configuration)/</OutputPath> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 23 additions & 10 deletions
33
core/hosting/HostWithHostFxr/src/NativeHost/inc/coreclr_delegates.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,47 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#ifndef __CORECLR_DELEGATES_H__ | ||
#define __CORECLR_DELEGATES_H__ | ||
|
||
#include <stdint.h> | ||
|
||
#if defined(_WIN32) | ||
#define CORECLR_DELEGATE_CALLTYPE __stdcall | ||
#ifdef _WCHAR_T_DEFINED | ||
typedef wchar_t char_t; | ||
#define CORECLR_DELEGATE_CALLTYPE __stdcall | ||
#ifdef _WCHAR_T_DEFINED | ||
typedef wchar_t char_t; | ||
#else | ||
typedef unsigned short char_t; | ||
#endif | ||
#else | ||
typedef unsigned short char_t; | ||
#endif | ||
#else | ||
#define CORECLR_DELEGATE_CALLTYPE | ||
typedef char char_t; | ||
#define CORECLR_DELEGATE_CALLTYPE | ||
typedef char char_t; | ||
#endif | ||
|
||
#define UNMANAGEDCALLERSONLY_METHOD ((const char_t*)-1) | ||
|
||
// Signature of delegate returned by coreclr_delegate_type::load_assembly_and_get_function_pointer | ||
typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_and_get_function_pointer_fn)( | ||
const char_t *assembly_path /* Fully qualified path to assembly */, | ||
const char_t *type_name /* Assembly qualified type name */, | ||
const char_t *method_name /* Public static method name compatible with delegateType */, | ||
const char_t *delegate_type_name /* Assembly qualified delegate type name or null */, | ||
const char_t *delegate_type_name /* Assembly qualified delegate type name or null | ||
or UNMANAGEDCALLERSONLY_METHOD if the method is marked with | ||
the UnmanagedCallersOnlyAttribute. */, | ||
void *reserved /* Extensibility parameter (currently unused and must be 0) */, | ||
/*out*/ void **delegate /* Pointer where to store the function pointer result */); | ||
|
||
// Signature of delegate returned by load_assembly_and_get_function_pointer_fn when delegate_type_name == null (default) | ||
typedef int (CORECLR_DELEGATE_CALLTYPE *component_entry_point_fn)(void *arg, int32_t arg_size_in_bytes); | ||
|
||
typedef int (CORECLR_DELEGATE_CALLTYPE *get_function_pointer_fn)( | ||
const char_t *type_name /* Assembly qualified type name */, | ||
const char_t *method_name /* Public static method name compatible with delegateType */, | ||
const char_t *delegate_type_name /* Assembly qualified delegate type name or null, | ||
or UNMANAGEDCALLERSONLY_METHOD if the method is marked with | ||
the UnmanagedCallersOnlyAttribute. */, | ||
void *load_context /* Extensibility parameter (currently unused and must be 0) */, | ||
void *reserved /* Extensibility parameter (currently unused and must be 0) */, | ||
/*out*/ void **delegate /* Pointer where to store the function pointer result */); | ||
|
||
#endif // __CORECLR_DELEGATES_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.