예제 #1
0
    private static Exception GetLastError()
    {
        IntPtr pointer = NativeUnixMehods.dlerror();

        return(pointer != IntPtr.Zero ? new InvalidOperationException(Marshal.PtrToStringAnsi(pointer)) : null);
    }
예제 #2
0
    private static Exception GetLastErrorUnix()
    {
        string message = NativeUnixMehods.dlerror();

        return(message != null ? new InvalidOperationException(message) : null);
    }