Ejemplo n.º 1
0
 public override unsafe void Write(byte[] buffer, int offset, int count)
 {
     byte[] buffer2;
     if (!this.CanWrite)
     {
         throw new NotImplementedException("Stream open for reading only");
     }
     if (offset == 0)
     {
         buffer2 = buffer;
     }
     else
     {
         buffer2 = new byte[count];
         Buffer.BlockCopy(buffer, offset, buffer2, 0, count);
     }
     int num = MobileDevice.AFCFileRefWrite(this.phone.AFCHandle, this.handle, buffer2, (uint)count);
 }
Ejemplo n.º 2
0
        public override unsafe void Write(byte[] buffer, int offset, int count)
        {
            byte[] buffer2;
            if (_mode != OpenMode.Write)
            {
                throw new NotImplementedException("Stream open for reading only");
            }
            if (offset == 0)
            {
                buffer2 = buffer;
            }
            else
            {
                buffer2 = new byte[count];
                Buffer.BlockCopy(buffer, offset, buffer2, 0, count);
            }
            uint len = (uint)count;

            MobileDevice.AFCFileRefWrite(_phone.AFCHandle, _handle, buffer2, len);
        }