From 03565cba36f00e41b14b9b7123235978684723d2 Mon Sep 17 00:00:00 2001 From: "pius.lee" Date: Mon, 17 Jul 2017 10:20:32 +0900 Subject: [PATCH] Fix elm_config_profile_get interop function Remove string auto mashaling from interop function. Change-Id: Ia54408e9b033c2d408a26b7e571181232d1a8218 --- src/ElmSharp/Interop/Interop.Elementary.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ElmSharp/Interop/Interop.Elementary.cs b/src/ElmSharp/Interop/Interop.Elementary.cs index f63a9c3..3791d11 100644 --- a/src/ElmSharp/Interop/Interop.Elementary.cs +++ b/src/ElmSharp/Interop/Interop.Elementary.cs @@ -71,8 +71,14 @@ internal static partial class Interop [DllImport(Libraries.Elementary)] internal static extern double elm_config_scale_get(); - [DllImport(Libraries.Elementary)] - internal static extern string elm_config_profile_get(); + [DllImport(Libraries.Elementary, EntryPoint = "elm_config_profile_get")] + internal static extern IntPtr _elm_config_profile_get(); + + internal static string elm_config_profile_get() + { + var str = _elm_config_profile_get(); + return Marshal.PtrToStringAnsi(str); + } [DllImport(Libraries.Elementary)] internal static extern void elm_config_preferred_engine_set(string name); -- 2.7.4