NativeMethods_stdstring.cs 1013 B

123456789101112131415161718192021222324
  1. using System.Diagnostics.Contracts;
  2. using System.Runtime.InteropServices;
  3. #pragma warning disable 1591
  4. namespace OpenCvSharp.Internal;
  5. static partial class NativeMethods
  6. {
  7. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  8. public static extern IntPtr string_new1();
  9. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
  10. public static extern IntPtr string_new2([MarshalAs(UnmanagedType.LPArray)] byte[] str);
  11. [DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  12. public static extern void string_delete(IntPtr s);
  13. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  14. public static extern unsafe sbyte* string_c_str(IntPtr s);
  15. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  16. public static extern nuint string_size(IntPtr s);
  17. }