diff options
author | Junghoon Park <jh9216.park@samsung.com> | 2017-03-08 11:07:50 +0900 |
---|---|---|
committer | Junghoon Park <jh9216.park@samsung.com> | 2017-03-08 11:07:50 +0900 |
commit | b8ae39dd2095d106199d5066829f06a40a5c26c1 (patch) | |
tree | b5c43f328c38784ddfda225f7d77701e4aa87dee | |
parent | 8fc4b9e54c6a97200df18ad8e2527b86fb64a94e (diff) | |
download | widget-viewer-b8ae39dd2095d106199d5066829f06a40a5c26c1.tar.gz widget-viewer-b8ae39dd2095d106199d5066829f06a40a5c26c1.tar.bz2 widget-viewer-b8ae39dd2095d106199d5066829f06a40a5c26c1.zip |
Fix bug about marshalling string
Change-Id: I353d6b24c9bcd2508920283c54a3e1e8460d0751
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
3 files changed, 18 insertions, 11 deletions
diff --git a/Tizen.Applications.RemoteView/Interop/Interop.WidgetViewerEvas.cs b/Tizen.Applications.RemoteView/Interop/Interop.WidgetViewerEvas.cs index aa9b2f8..cdc4066 100755 --- a/Tizen.Applications.RemoteView/Interop/Interop.WidgetViewerEvas.cs +++ b/Tizen.Applications.RemoteView/Interop/Interop.WidgetViewerEvas.cs @@ -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); diff --git a/Tizen.Applications.RemoteView/Tizen.Applications.RemoteView.project.lock.json b/Tizen.Applications.RemoteView/Tizen.Applications.RemoteView.project.lock.json index 1230bab..a94d6c0 100755 --- a/Tizen.Applications.RemoteView/Tizen.Applications.RemoteView.project.lock.json +++ b/Tizen.Applications.RemoteView/Tizen.Applications.RemoteView.project.lock.json @@ -3,7 +3,7 @@ "version": 2,
"targets": {
".NETStandard,Version=v1.3": {
- "ElmSharp/1.1.0-beta-005": {
+ "ElmSharp/1.1.0-beta-011": {
"type": "package",
"compile": {
"lib/netstandard1.3/ElmSharp.dll": {}
@@ -819,12 +819,12 @@ }
},
"libraries": {
- "ElmSharp/1.1.0-beta-005": {
- "sha512": "zFIFe8eaLj+3vqlgq07cav9zM7WwEgSWJFPXNpZtyib5F2Buy3T3E9QQhYgLchTpuhaFBTHjnv6KEUXNtHvJNw==",
+ "ElmSharp/1.1.0-beta-011": {
+ "sha512": "0ZQqB2XEc0aA0f+2Je272fZE+uDLJ8rfzrjlifwCLWGd4luyPuOVYPhptN3vb0Nid8pTvBSpaQQOFc+pZbUeTA==",
"type": "package",
- "path": "ElmSharp/1.1.0-beta-005",
+ "path": "ElmSharp/1.1.0-beta-011",
"files": [
- "ElmSharp.1.1.0-beta-005.nupkg.sha512",
+ "ElmSharp.1.1.0-beta-011.nupkg.sha512",
"ElmSharp.nuspec",
"lib/net45/ElmSharp.dll",
"lib/netstandard1.3/ElmSharp.dll"
diff --git a/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs b/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs index a00828f..44cad3b 100755 --- a/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs +++ b/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs @@ -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); } } |