1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4#include <stdio.h>
5#include <xplatform.h>
6
7extern "C" DLL_EXPORT int NativeSum(int a, int b)
8{
9 return a + b;
10}
11
12extern "C" DLL_EXPORT int RunExportedFunction(void *function, int arg1, int arg2)
13{
14 int(*f)(int, int) = reinterpret_cast<int(*)(int,int)>(function);
15 return f(arg1, arg2);
16}
17
18
19