@@ -28,6 +28,8 @@ enum hostfxr_delegate_type
28
28
hdt_com_unregister ,
29
29
hdt_load_assembly_and_get_function_pointer ,
30
30
hdt_get_function_pointer ,
31
+ hdt_load_assembly ,
32
+ hdt_load_assembly_bytes ,
31
33
};
32
34
33
35
typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_main_fn )(const int argc , const char_t * * argv );
@@ -353,12 +355,64 @@ struct hostfxr_dotnet_environment_info
353
355
//
354
356
// String encoding:
355
357
// 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)
357
359
//
358
360
typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_get_dotnet_environment_info_fn )(
359
361
const char_t * dotnet_root ,
360
362
void * reserved ,
361
363
hostfxr_get_dotnet_environment_info_result_fn result ,
362
364
void * result_context );
363
365
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
+
364
418
#endif //__HOSTFXR_H__
0 commit comments