Commits

Tobias Bohnen committed 6f215ba

* revert

  • Participants
  • Parent commits e4ac731

Comments (0)

Files changed (2)

             return NativeMethods.cgGetFirstError();
         }
 
-        public static string GetLastErrorString(ErrorType error)
+        public static string GetLastErrorString(out ErrorType error)
         {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetLastErrorString(error));
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetLastErrorString(out error));
         }
 
         public static ParameterType GetMatrixSize(ParameterType type, out int nrows, out int ncols)

CgNet/NativeMethods.cs

 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        public static extern IntPtr cgGetLastErrorString(ErrorType error);
+        public static extern IntPtr cgGetLastErrorString(out ErrorType error);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]