TxnBegin() private method

private TxnBegin ( IntPtr &txnhandle, IntPtr envhandle, String filename, IntPtr reserved, int flags ) : int
txnhandle System.IntPtr
envhandle System.IntPtr
filename String
reserved System.IntPtr
flags int
return int
コード例 #1
0
        /// <summary>
        /// Begins a new Transaction
        /// </summary>
        /// <remarks>
        /// This method wraps the native ups_txn_begin function.
        /// </remarks>
        public Transaction Begin(int flags)
        {
            int    st;
            IntPtr txnh;

            lock (this) {
                st = NativeMethods.TxnBegin(out txnh, handle, null,
                                            IntPtr.Zero, flags);
            }
            if (st != 0)
            {
                throw new DatabaseException(st);
            }
            return(new Transaction(this, txnh));
        }