@@ -28,6 +28,8 @@ enum hostfxr_delegate_type
2828 hdt_com_unregister ,
2929 hdt_load_assembly_and_get_function_pointer ,
3030 hdt_get_function_pointer ,
31+ hdt_load_assembly ,
32+ hdt_load_assembly_bytes ,
3133};
3234
3335typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_main_fn )(const int argc , const char_t * * argv );
@@ -353,12 +355,64 @@ struct hostfxr_dotnet_environment_info
353355//
354356// String encoding:
355357// Windows - UTF-16 (pal::char_t is 2 byte wchar_t)
356- // Unix - UTF-8 (pal::char_t is 1 byte char)
358+ // Non-Windows - UTF-8 (pal::char_t is 1 byte char)
357359//
358360typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_get_dotnet_environment_info_fn )(
359361 const char_t * dotnet_root ,
360362 void * reserved ,
361363 hostfxr_get_dotnet_environment_info_result_fn result ,
362364 void * result_context );
363365
366+ struct hostfxr_framework_result
367+ {
368+ size_t size ;
369+ const char_t * name ;
370+ const char_t * requested_version ;
371+ const char_t * resolved_version ;
372+ const char_t * resolved_path ;
373+ };
374+
375+ struct hostfxr_resolve_frameworks_result
376+ {
377+ size_t size ;
378+
379+ size_t resolved_count ;
380+ const struct hostfxr_framework_result * resolved_frameworks ;
381+
382+ size_t unresolved_count ;
383+ const struct hostfxr_framework_result * unresolved_frameworks ;
384+ };
385+
386+ typedef void (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_result_fn )(
387+ const hostfxr_resolve_frameworks_result * result ,
388+ void * result_context );
389+
390+ //
391+ // Resolves frameworks for a runtime config
392+ //
393+ // Parameters:
394+ // runtime_config_path
395+ // Path to the .runtimeconfig.json file
396+ // parameters
397+ // Optional. Additional parameters for initialization.
398+ // If null or dotnet_root is null, the root corresponding to the running hostfx is used.
399+ // callback
400+ // Optional. Result callback invoked with result of the resolution.
401+ // Structs and their elements are valid for the duration of the call.
402+ // result_context
403+ // Optional. Additional context passed to the result callback.
404+ //
405+ // Return value:
406+ // 0 on success, otherwise failure.
407+ //
408+ // String encoding:
409+ // Windows - UTF-16 (pal::char_t is 2-byte wchar_t)
410+ // Non-Windows - UTF-8 (pal::char_t is 1-byte char)
411+ //
412+ typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_for_runtime_config_fn )(
413+ const char_t * runtime_config_path ,
414+ /*opt*/ const hostfxr_initialize_parameters * parameters ,
415+ /*opt*/ hostfxr_resolve_frameworks_result_fn callback ,
416+ /*opt*/ void * result_context );
417+
364418#endif //__HOSTFXR_H__
0 commit comments