예제 #1
0
        /// <summary>
        /// Read up to |size| bytes into |bytes| and return the number of bytes
        /// actually read.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public ulong GetBytes(ulong size, RemotePtr bytes)
        {
            var call = new CfxPostDataElementGetBytesRemoteCall();

            call.@this = RemotePtr.ptr;
            call.size  = size;
            call.bytes = bytes.ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
        /// <summary>
        /// Read up to |size| bytes into |bytes| and return the number of bytes
        /// actually read.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public ulong GetBytes(ulong size, RemotePtr bytes)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxPostDataElementGetBytesRemoteCall();

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