Beispiel #1
0
        public void SharePhoto(
            int requestId,
            byte[] photoData,
            string hashtag)
        {
            int bufferSize = photoData.Length;

            int size = Marshal.SizeOf(photoData[0]) * bufferSize;

            IntPtr imageBuffer = Marshal.AllocHGlobal(size);

            try
            {
                // Copy the array to unmanaged memory.
                Marshal.Copy(photoData, 0, imageBuffer, bufferSize);

                IOSWrapper.IOSFBSharePhoto(
                    requestId,
                    imageBuffer,
                    bufferSize,
                    hashtag);
            }
            finally
            {
                // Free the unmanaged memory.
                Marshal.FreeHGlobal(imageBuffer);
            }
        }
Beispiel #2
0
 public void SharePhoto(
     int requestId,
     string texture,
     string photoURL,
     bool userGenerated,
     string caption)
 {
     IOSWrapper.IOSFBSharePhoto(
         requestId,
         texture,
         photoURL,
         userGenerated,
         caption);
 }