11// Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the MIT license.
33
4- #ifndef __HOSTFXR_H__
5- #define __HOSTFXR_H__
4+ #ifndef HAVE_HOSTFXR_H
5+ #define HAVE_HOSTFXR_H
66
77#include <stddef.h>
88#include <stdint.h>
99
10+ #ifdef __cplusplus
11+ extern "C"
12+ {
13+ #endif // __cplusplus
14+
1015#if defined(_WIN32 )
1116 #define HOSTFXR_CALLTYPE __cdecl
1217 #ifdef _WCHAR_T_DEFINED
@@ -130,7 +135,7 @@ typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)
130135// Success - Hosting components were successfully initialized
131136// Success_HostAlreadyInitialized - Config is compatible with already initialized hosting components
132137// Success_DifferentRuntimeProperties - Config has runtime properties that differ from already initialized hosting components
133- // CoreHostIncompatibleConfig - Config is incompatible with already initialized hosting components
138+ // HostIncompatibleConfig - Config is incompatible with already initialized hosting components
134139//
135140// This function will process the .runtimeconfig.json to resolve frameworks and prepare everything needed
136141// to load the runtime. It will only process the .deps.json from frameworks (not any app/component that
@@ -296,10 +301,6 @@ struct hostfxr_dotnet_environment_sdk_info
296301 const char_t * path ;
297302};
298303
299- typedef void (HOSTFXR_CALLTYPE * hostfxr_get_dotnet_environment_info_result_fn )(
300- const struct hostfxr_dotnet_environment_info * info ,
301- void * result_context );
302-
303304struct hostfxr_dotnet_environment_framework_info
304305{
305306 size_t size ;
@@ -322,6 +323,10 @@ struct hostfxr_dotnet_environment_info
322323 const struct hostfxr_dotnet_environment_framework_info * frameworks ;
323324};
324325
326+ typedef void (HOSTFXR_CALLTYPE * hostfxr_get_dotnet_environment_info_result_fn )(
327+ const struct hostfxr_dotnet_environment_info * info ,
328+ void * result_context );
329+
325330//
326331// Returns available SDKs and frameworks.
327332//
@@ -384,7 +389,7 @@ struct hostfxr_resolve_frameworks_result
384389};
385390
386391typedef void (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_result_fn )(
387- const hostfxr_resolve_frameworks_result * result ,
392+ const struct hostfxr_resolve_frameworks_result * result ,
388393 void * result_context );
389394
390395//
@@ -411,8 +416,12 @@ typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)(
411416//
412417typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_for_runtime_config_fn )(
413418 const char_t * runtime_config_path ,
414- /*opt*/ const hostfxr_initialize_parameters * parameters ,
419+ /*opt*/ const struct hostfxr_initialize_parameters * parameters ,
415420 /*opt*/ hostfxr_resolve_frameworks_result_fn callback ,
416421 /*opt*/ void * result_context );
417422
418- #endif //__HOSTFXR_H__
423+ #ifdef __cplusplus
424+ }
425+ #endif // __cplusplus
426+
427+ #endif // HAVE_HOSTFXR_H
0 commit comments