Example #1
0
 public static extern IntPtr uc_strerror(UnicornError err);
Example #2
0
 public string StrError(UnicornError err)
 => Marshal.PtrToStringAnsi(uc_strerror((uc_err)err));
Example #3
0
 internal UnicornException(UnicornError error)
 {
     Error = error;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnicornException"/> class with the specified <see cref="Binds.UnicornError"/>.
 /// </summary>
 /// <param name="error"><see cref="Binds.UnicornError"/> error code.</param>
 public UnicornException(UnicornError error) : base(Bindings.Instance.StrError(error))
 {
     ErrorCode = error;
 }