1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
- #ifndef __HOSTFXR_H__
5
- #define __HOSTFXR_H__
4
+ #ifndef HAVE_HOSTFXR_H
5
+ #define HAVE_HOSTFXR_H
6
6
7
7
#include <stddef.h>
8
8
#include <stdint.h>
9
9
10
+ #ifdef __cplusplus
11
+ extern "C"
12
+ {
13
+ #endif // __cplusplus
14
+
10
15
#if defined(_WIN32 )
11
16
#define HOSTFXR_CALLTYPE __cdecl
12
17
#ifdef _WCHAR_T_DEFINED
@@ -130,7 +135,7 @@ typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)
130
135
// Success - Hosting components were successfully initialized
131
136
// Success_HostAlreadyInitialized - Config is compatible with already initialized hosting components
132
137
// 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
134
139
//
135
140
// This function will process the .runtimeconfig.json to resolve frameworks and prepare everything needed
136
141
// 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
296
301
const char_t * path ;
297
302
};
298
303
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
-
303
304
struct hostfxr_dotnet_environment_framework_info
304
305
{
305
306
size_t size ;
@@ -322,6 +323,10 @@ struct hostfxr_dotnet_environment_info
322
323
const struct hostfxr_dotnet_environment_framework_info * frameworks ;
323
324
};
324
325
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
+
325
330
//
326
331
// Returns available SDKs and frameworks.
327
332
//
@@ -384,7 +389,7 @@ struct hostfxr_resolve_frameworks_result
384
389
};
385
390
386
391
typedef void (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_result_fn )(
387
- const hostfxr_resolve_frameworks_result * result ,
392
+ const struct hostfxr_resolve_frameworks_result * result ,
388
393
void * result_context );
389
394
390
395
//
@@ -411,8 +416,12 @@ typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)(
411
416
//
412
417
typedef int32_t (HOSTFXR_CALLTYPE * hostfxr_resolve_frameworks_for_runtime_config_fn )(
413
418
const char_t * runtime_config_path ,
414
- /*opt*/ const hostfxr_initialize_parameters * parameters ,
419
+ /*opt*/ const struct hostfxr_initialize_parameters * parameters ,
415
420
/*opt*/ hostfxr_resolve_frameworks_result_fn callback ,
416
421
/*opt*/ void * result_context );
417
422
418
- #endif //__HOSTFXR_H__
423
+ #ifdef __cplusplus
424
+ }
425
+ #endif // __cplusplus
426
+
427
+ #endif // HAVE_HOSTFXR_H
0 commit comments