Fix bug about marshalling string
authorJunghoon Park <jh9216.park@samsung.com>
Wed, 8 Mar 2017 02:07:50 +0000 (11:07 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 8 Mar 2017 02:07:50 +0000 (11:07 +0900)
Change-Id: I353d6b24c9bcd2508920283c54a3e1e8460d0751
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/Tizen.Applications.RemoteView/Interop/Interop.WidgetViewerEvas.cs
src/Tizen.Applications.RemoteView/Tizen.Applications.RemoteView.project.lock.json
src/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs

index aa9b2f8..cdc4066 100755 (executable)
@@ -65,13 +65,13 @@ internal static partial class Interop
         internal static extern ErrorCode ResumeWidget(IntPtr widget);
 
         [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_content_info")]
-        internal static extern string GetContentInfo(IntPtr widget);
+        internal static extern IntPtr GetContentInfo(IntPtr widget);
 
         [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_title_string")]
-        internal static extern string GetTitleString(IntPtr widget);
+        internal static extern IntPtr GetTitleString(IntPtr widget);
 
         [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_widget_id")]
-        internal static extern string GetWidgetId(IntPtr widget);
+        internal static extern IntPtr GetWidgetId(IntPtr widget);
 
         [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_period")]
         internal static extern double GetPeriod(IntPtr widget);
index 1230bab..a94d6c0 100755 (executable)
@@ -3,7 +3,7 @@
   "version": 2,\r
   "targets": {\r
     ".NETStandard,Version=v1.3": {\r
-      "ElmSharp/1.1.0-beta-005": {\r
+      "ElmSharp/1.1.0-beta-011": {\r
         "type": "package",\r
         "compile": {\r
           "lib/netstandard1.3/ElmSharp.dll": {}\r
     }\r
   },\r
   "libraries": {\r
-    "ElmSharp/1.1.0-beta-005": {\r
-      "sha512": "zFIFe8eaLj+3vqlgq07cav9zM7WwEgSWJFPXNpZtyib5F2Buy3T3E9QQhYgLchTpuhaFBTHjnv6KEUXNtHvJNw==",\r
+    "ElmSharp/1.1.0-beta-011": {\r
+      "sha512": "0ZQqB2XEc0aA0f+2Je272fZE+uDLJ8rfzrjlifwCLWGd4luyPuOVYPhptN3vb0Nid8pTvBSpaQQOFc+pZbUeTA==",\r
       "type": "package",\r
-      "path": "ElmSharp/1.1.0-beta-005",\r
+      "path": "ElmSharp/1.1.0-beta-011",\r
       "files": [\r
-        "ElmSharp.1.1.0-beta-005.nupkg.sha512",\r
+        "ElmSharp.1.1.0-beta-011.nupkg.sha512",\r
         "ElmSharp.nuspec",\r
         "lib/net45/ElmSharp.dll",\r
         "lib/netstandard1.3/ElmSharp.dll"\r
index a00828f..44cad3b 100755 (executable)
@@ -16,6 +16,7 @@
 
 using ElmSharp;
 using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.Applications
 {
@@ -54,7 +55,9 @@ namespace Tizen.Applications
         {
             get
             {
-                return Interop.WidgetViewerEvas.GetWidgetId(Layout);
+                IntPtr ptr = Interop.WidgetViewerEvas.GetWidgetId(Layout);
+
+                return Marshal.PtrToStringAnsi(ptr);
             }
         }
 
@@ -81,7 +84,9 @@ namespace Tizen.Applications
         {
             get
             {
-                return Interop.WidgetViewerEvas.GetContentInfo(Layout);
+                IntPtr ptr = Interop.WidgetViewerEvas.GetContentInfo(Layout);
+
+                return Marshal.PtrToStringAnsi(ptr);
             }
         }
 
@@ -93,7 +98,9 @@ namespace Tizen.Applications
         {
             get
             {
-                return Interop.WidgetViewerEvas.GetTitleString(Layout);
+                IntPtr ptr = Interop.WidgetViewerEvas.GetTitleString(Layout);
+
+                return Marshal.PtrToStringAnsi(ptr);
             }
         }