1 module bindbc.hostfxr.types; 2 3 enum NethostSupport { 4 noLibrary, 5 badLibrary, 6 nethost 7 } 8 9 enum HostfxrSupport { 10 noLibrary, 11 badLibrary, 12 hostfxr 13 } 14 15 version(Windows) 16 alias char_t = const(wchar); 17 else 18 alias char_t = immutable(char); 19 20 enum UnmanagedCallersOnly = cast(char_t*)-1; 21 22 enum hostfxr_delegate_type 23 { 24 hdt_com_activation, 25 hdt_load_in_memory_assembly, 26 hdt_winrt_activation, 27 hdt_com_register, 28 hdt_com_unregister, 29 hdt_load_assembly_and_get_function_pointer, 30 hdt_get_function_pointer, 31 hdt_load_assembly, 32 hdt_load_assembly_bytes, 33 } 34 35 alias hostfxr_handle = void*; 36 37 struct hostfxr_initialize_parameters 38 { 39 size_t size = hostfxr_initialize_parameters.sizeof; 40 char_t* host_path; 41 char_t* dotnet_root; 42 } 43 44 struct hostfxr_dotnet_environment_sdk_info 45 { 46 size_t size; 47 char_t* _version; 48 char_t* path; 49 } 50 51 struct hostfxr_dotnet_environment_framework_info 52 { 53 size_t size; 54 char_t* name; 55 char_t* _version; 56 char_t* path; 57 } 58 59 struct hostfxr_dotnet_environment_info 60 { 61 size_t size; 62 63 char_t* hostfxr_version; 64 char_t* hostfxr_commit_hash; 65 66 size_t sdk_count; 67 hostfxr_dotnet_environment_sdk_info* sdks; 68 69 size_t framework_count; 70 hostfxr_dotnet_environment_framework_info* frameworks; 71 } 72 73 struct get_hostfxr_parameters { 74 size_t size; 75 const char_t* assembly_path; 76 const char_t* dotnet_root; 77 }