Exemplo n.º 1
0
        /// <summary>
        /// Read raw binary data.
        /// </summary>
        private int read(cef_read_handler_t* self, void* ptr, int size, int n)
        {
            ThrowIfObjectDisposed();

            long length = size * n;
            using (var m_stream = new UnmanagedMemoryStream((byte*)ptr, length, length, FileAccess.Write))
            {
                return this.Read(m_stream, size, n);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Return the current offset position.
        /// </summary>
        private long tell(cef_read_handler_t* self)
        {
            ThrowIfObjectDisposed();

            return this.Tell();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Seek to the specified offset position. |whence| may be any one of
        /// SEEK_CUR, SEEK_END or SEEK_SET.
        /// </summary>
        private int seek(cef_read_handler_t* self, long offset, int whence)
        {
            ThrowIfObjectDisposed();

            return this.Seek(offset, (SeekOrigin)whence) ? 0 : 1;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Return non-zero if at end of file.
        /// </summary>
        private int eof(cef_read_handler_t* self)
        {
            ThrowIfObjectDisposed();

            return this.Eof() ? 1 : 0;
        }