Exemplo n.º 1
0
            internal OleDbHResult Abort()
            {
                Debug.Assert(_mustComplete, "transaction already completed");
                OleDbHResult hr;
                bool         mustRelease = false;

                RuntimeHelpers.PrepareConstrainedRegions();
                try
                {
                    DangerousAddRef(ref mustRelease);
                    RuntimeHelpers.PrepareConstrainedRegions();
                    try
                    { }
                    finally
                    {
                        hr            = (OleDbHResult)NativeOledbWrapper.ITransactionAbort(DangerousGetHandle());
                        _mustComplete = false;
                    }
                }
                finally
                {
                    if (mustRelease)
                    {
                        DangerousRelease();
                    }
                }
                return(hr);
            }
Exemplo n.º 2
0
            internal OleDbHResult Abort()
            {
                OleDbHResult result;
                bool         success = false;

                RuntimeHelpers.PrepareConstrainedRegions();
                try
                {
                    base.DangerousAddRef(ref success);
                    Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB> handle=%p\n", base.handle);
                    RuntimeHelpers.PrepareConstrainedRegions();
                    try
                    {
                    }
                    finally
                    {
                        result             = NativeOledbWrapper.ITransactionAbort(base.DangerousGetHandle());
                        this._mustComplete = false;
                    }
                    Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB|RET> %08X{HRESULT}\n", result);
                }
                finally
                {
                    if (success)
                    {
                        base.DangerousRelease();
                    }
                }
                return(result);
            }
Exemplo n.º 3
0
            internal OleDbHResult Abort()
            {
                Debug.Assert(_mustComplete, "transaction already completed");
                OleDbHResult hr;
                bool         mustRelease = false;

                RuntimeHelpers.PrepareConstrainedRegions();
                try {
                    DangerousAddRef(ref mustRelease);

                    Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB> handle=%p\n", base.handle);
                    RuntimeHelpers.PrepareConstrainedRegions();
                    try { } finally {
                        hr            = (OleDbHResult)NativeOledbWrapper.ITransactionAbort(DangerousGetHandle());
                        _mustComplete = false;
                    }
                    Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB|RET> %08X{HRESULT}\n", hr);
                }
                finally {
                    if (mustRelease)
                    {
                        DangerousRelease();
                    }
                }
                return(hr);
            }
Exemplo n.º 4
0
 protected override bool ReleaseHandle()
 {
     if (_mustComplete && (IntPtr.Zero != base.handle))
     {
         NativeOledbWrapper.ITransactionAbort(base.handle);
         _mustComplete = false;
     }
     return(base.ReleaseHandle());
 }
Exemplo n.º 5
0
 protected override bool ReleaseHandle()
 {
     if (this._mustComplete && (IntPtr.Zero != base.handle))
     {
         Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB|INFO> handle=%p\n", base.handle);
         OleDbHResult result = NativeOledbWrapper.ITransactionAbort(base.handle);
         this._mustComplete = false;
         Bid.Trace("<oledb.ITransactionLocal.Abort|API|OLEDB|INFO|RET> %08X{HRESULT}\n", result);
     }
     return(base.ReleaseHandle());
 }