From b6098b281a887212ccc27b4131d1fece6065537b Mon Sep 17 00:00:00 2001 From: Speykious Date: Sat, 15 Jan 2022 03:33:24 +0100 Subject: [PATCH] Port `Stdlib` --- .../UnsafeNativeMethods/External/Stdlib.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Mediapipe.Net/Native/UnsafeNativeMethods/External/Stdlib.cs diff --git a/Mediapipe.Net/Native/UnsafeNativeMethods/External/Stdlib.cs b/Mediapipe.Net/Native/UnsafeNativeMethods/External/Stdlib.cs new file mode 100644 index 0000000..55f813e --- /dev/null +++ b/Mediapipe.Net/Native/UnsafeNativeMethods/External/Stdlib.cs @@ -0,0 +1,25 @@ +// Copyright (c) homuler and Vignette +// This file is part of MediaPipe.NET. +// MediaPipe.NET is licensed under the MIT License. See LICENSE for details. + +using System; +using System.Runtime.InteropServices; + +namespace Mediapipe.Net.Native; + +internal partial class UnsafeNativeMethods : NativeMethods +{ + [DllImport(MEDIAPIPE_LIBRARY, ExactSpelling = true)] + public static extern void delete_array__PKc(IntPtr str); + + #region String + [DllImport(MEDIAPIPE_LIBRARY, ExactSpelling = true)] + public static extern void std_string__delete(IntPtr str); + + [DllImport(MEDIAPIPE_LIBRARY, ExactSpelling = true)] + public static extern MpReturnCode std_string__PKc_i(byte[] bytes, int size, out IntPtr str); + + [DllImport(MEDIAPIPE_LIBRARY, ExactSpelling = true)] + public static extern void std_string__swap__Rstr(IntPtr src, IntPtr dst); + #endregion +}