Beispiel #1
0
        /// <summary>
        /// Read uncompressed file contents into the specified buffer. Returns &lt; 0 if
        /// an error occurred, 0 if at the end of file, or the number of bytes read.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_zip_reader_capi.h">cef/include/capi/cef_zip_reader_capi.h</see>.
        /// </remarks>
        public int ReadFile(RemotePtr buffer, ulong bufferSize)
        {
            var call = new CfxZipReaderReadFileRemoteCall();

            call.@this      = RemotePtr.ptr;
            call.buffer     = buffer.ptr;
            call.bufferSize = bufferSize;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
        /// <summary>
        /// Read uncompressed file contents into the specified buffer. Returns &lt; 0 if
        /// an error occurred, 0 if at the end of file, or the number of bytes read.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_zip_reader_capi.h">cef/include/capi/cef_zip_reader_capi.h</see>.
        /// </remarks>
        public int ReadFile(RemotePtr buffer, ulong bufferSize)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxZipReaderReadFileRemoteCall();

            call.@this = RemotePtr.ptr;
            if (buffer.connection != connection)
            {
                throw new ArgumentException("Render process connection mismatch.", "buffer");
            }
            call.buffer     = buffer.ptr;
            call.bufferSize = bufferSize;
            call.RequestExecution(connection);
            return(call.__retval);
        }