示例#1
0
 /// <summary>
 /// Sets the length of the stream
 /// </summary>
 /// <param name="Value">new length of the stream</param>
 public override void SetLength(long Value)
 {
     if (fileStream == null)
     {
         throw new ObjectDisposedException("fileStream", "storage stream no longer available");
     }
     fileStream.SetSize(Value);
 }
示例#2
0
        protected void SetUTF(string key, uint keyValue, string value)
        {
            System.Runtime.InteropServices.ComTypes.IStream ppstm = getStream(key);
            IntPtr pm = new IntPtr();

            byte[] p = Encoding.UTF8.GetBytes(value);

            ppstm.Write(p, p.Length, pm);
            ppstm.SetSize(p.Length);

            ppstm.Commit(0);
            Marshal.ReleaseComObject(ppstm);

            modifyProperty(keyValue, p.Length + 1);
        }
示例#3
0
 public override void SetLength(long value)
 {
     ReportDebugStream("StreamWrapper.SetLength: {0}\r\n", value);
     _istream.SetSize(value);
 }