f-spot r3831 - in trunk: . libgphoto2-sharp



Author: sdelcroix
Date: Tue Apr 15 11:00:53 2008
New Revision: 3831
URL: http://svn.gnome.org/viewvc/f-spot?rev=3831&view=rev

Log:
2008-04-15  Stephane Delcroix  <sdelcroix novell com>

	* libgphoto2-sharp/CameraList.cs: Fixing two P/Invoke issues.
	Fixes bgo #528162.


Modified:
   trunk/ChangeLog
   trunk/libgphoto2-sharp/CameraList.cs

Modified: trunk/libgphoto2-sharp/CameraList.cs
==============================================================================
--- trunk/libgphoto2-sharp/CameraList.cs	(original)
+++ trunk/libgphoto2-sharp/CameraList.cs	Tue Apr 15 11:00:53 2008
@@ -69,27 +69,27 @@
 		}
 		
 		[DllImport ("libgphoto2.so")]
-		internal static extern ErrorCode gp_list_get_name (HandleRef list, int index, out string name);
+		internal static extern ErrorCode gp_list_get_name (HandleRef list, int index, out IntPtr name);
 
 		public string GetName (int index)
 		{
-			string name;
+			IntPtr name;
 
 			Error.CheckError (gp_list_get_name(this.Handle, index, out name));
 
-			return name;
+			return Marshal.PtrToStringAnsi (name);
 		}
 		
 		[DllImport ("libgphoto2.so")]
-		internal static extern ErrorCode gp_list_get_value (HandleRef list, int index, out string value);
+		internal static extern ErrorCode gp_list_get_value (HandleRef list, int index, out IntPtr value);
 
 		public string GetValue (int index)
 		{
-			string value;
+			IntPtr value;
 
 			Error.CheckError (gp_list_get_value(this.Handle, index, out value));
 
-			return value;
+			return Marshal.PtrToStringAnsi (value);
 		}
 		
 		[DllImport ("libgphoto2.so")]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]