Zetbox.Client.WPF.View.DocumentManagement.COMStream.Read C# (CSharp) Method

Read() private method

private Read ( byte pv, int cb, IntPtr pcbRead ) : void
pv byte
cb int
pcbRead System.IntPtr
return void
        public void Read(byte[] pv, int cb, IntPtr pcbRead)
        {
            int count = this._stream.Read(pv, 0, cb);

            // destination expects an ULONG (32 bit?), therefore we must guard against negative values
            if (pcbRead != IntPtr.Zero)
            {
                Marshal.WriteInt32(pcbRead, count >= 0 ? count : 0);
            }
        }