SNIClose() private method

private SNIClose ( IntPtr pConn ) : uint
pConn IntPtr
return uint
Beispiel #1
0
        protected override bool ReleaseHandle()
        {
            IntPtr handle = base.handle;

            base.handle = IntPtr.Zero;
            if ((IntPtr.Zero != handle) && (SNINativeMethodWrapper.SNIClose(handle) != 0))
            {
                return(false);
            }
            return(true);
        }
        override protected bool ReleaseHandle()
        {
            // NOTE: The SafeHandle class guarantees this will be called exactly once.
            IntPtr ptr = base.handle;

            base.handle = IntPtr.Zero;
            if (IntPtr.Zero != ptr)
            {
                if (0 != SNINativeMethodWrapper.SNIClose(ptr))
                {
                    return(false);   // SNIClose should never fail.
                }
            }
            return(true);
        }