summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
blob: b140c0fc80f0e82b34088bac6a02f252df09b45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.Runtime.InteropServices;

namespace Efl { namespace Eo {

public partial class FunctionInterop
{
    [DllImport(efl.Libs.Libdl)]
    public static extern IntPtr dlsym(IntPtr handle, string symbol);
        
    public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
    {
        Console.WriteLine("searching {0} in library {1}", nativeLibraryHandle, functionName);
        var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName);
        Console.WriteLine("searching {0} in library {1}, result {2}", nativeLibraryHandle, functionName, s);
        return s;
    }
}


} }