diff options
Diffstat (limited to 'src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs')
-rw-r--r-- | src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs | 21 |
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..76ee489 --- /dev/null +++ b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs | |||
@@ -0,0 +1,21 @@ | |||
1 | using System; | ||
2 | using System.Runtime.InteropServices; | ||
3 | |||
4 | namespace Efl { namespace Eo { | ||
5 | |||
6 | public 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 | Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}"); | ||
14 | var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName); | ||
15 | Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}, result {s}"); | ||
16 | return s; | ||
17 | } | ||
18 | } | ||
19 | |||
20 | |||
21 | } } | ||