summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-31 16:13:50 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-31 16:13:50 +0900
commite071c66c95426be409cb2df4b1b3f1725bca1611 (patch)
tree3f81ea5bf925d2e699b5425c3455ec6b8c9ddc01 /src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
parentd7e70ca96a1e69ff78e72a8f2b79c0ebf68393aa (diff)
Changes to support dotnet core
Diffstat (limited to 'src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs')
-rw-r--r--src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
new file mode 100644
index 0000000..b140c0f
--- /dev/null
+++ b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
@@ -0,0 +1,21 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public partial class FunctionInterop
7{
8 [DllImport(efl.Libs.Libdl)]
9 public static extern IntPtr dlsym(IntPtr handle, string symbol);
10
11 public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
12 {
13 Console.WriteLine("searching {0} in library {1}", nativeLibraryHandle, functionName);
14 var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName);
15 Console.WriteLine("searching {0} in library {1}, result {2}", nativeLibraryHandle, functionName, s);
16 return s;
17 }
18}
19
20
21} }