Пример #1
0
        /// <summary>
        /// Read raw binary data.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_stream_capi.h">cef/include/capi/cef_stream_capi.h</see>.
        /// </remarks>
        public ulong Read(RemotePtr ptr, ulong size, ulong n)
        {
            var call = new CfxStreamReaderReadRemoteCall();

            call.@this = RemotePtr.ptr;
            call.ptr   = ptr.ptr;
            call.size  = size;
            call.n     = n;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
        /// <summary>
        /// Read raw binary data.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_stream_capi.h">cef/include/capi/cef_stream_capi.h</see>.
        /// </remarks>
        public ulong Read(RemotePtr ptr, ulong size, ulong n)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxStreamReaderReadRemoteCall();

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