Esempio n. 1
0
        // Token: 0x0600094D RID: 2381 RVA: 0x0002B9FC File Offset: 0x00029BFC
        protected static void GetAndSetIntPtrInCER(string serverName, string dbName, string transferAddress, ref SafeBackupContextHandle backupHandle)
        {
            IntPtr zero  = IntPtr.Zero;
            IntPtr value = new IntPtr(-1);
            bool   flag  = false;
            int    num   = 0;

            RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
            }
            finally
            {
                num  = backupHandle.GetBackupContextIntPtr(serverName, dbName, transferAddress, out zero);
                flag = (num == 0 && zero != IntPtr.Zero && zero != value);
                if (flag)
                {
                    backupHandle.SetHandle(zero);
                }
            }
            if (!flag)
            {
                throw new FailedToOpenBackupFileHandleException(dbName, serverName, num, SeedHelper.TranslateSeederErrorCode((long)num, serverName));
            }
        }