// Token: 0x06000536 RID: 1334 RVA: 0x0001393C File Offset: 0x00011B3C private IDistributedStoreKey OpenKeyInternal(string subKeyName, DxStoreKeyAccessMode mode, bool isIgnoreIfNotExist) { AmClusterRegkeyHandle amClusterRegkeyHandle = null; AmClusterRegkeyHandle keyHandle = this.KeyHandle; RegSAM regSam = ClusterDbKey.GetRegSam(mode); int num = ClusapiMethods.ClusterRegOpenKey(keyHandle, subKeyName, regSam, out amClusterRegkeyHandle); if (mode == DxStoreKeyAccessMode.CreateIfNotExist && (num == 2 || num == 3)) { uint num2; num = ClusapiMethods.ClusterRegCreateKey(keyHandle, subKeyName, 0U, regSam, IntPtr.Zero, out amClusterRegkeyHandle, out num2); } if (num == 0) { return(new ClusterDbKey(amClusterRegkeyHandle, this.ClusterHandle)); } if (amClusterRegkeyHandle != null && !amClusterRegkeyHandle.IsInvalid) { amClusterRegkeyHandle.Dispose(); } amClusterRegkeyHandle = null; if (!isIgnoreIfNotExist) { throw new ClusterApiException("ClusterRegOpenKey", new Win32Exception(num)); } return(null); }
// Token: 0x06000533 RID: 1331 RVA: 0x000138B8 File Offset: 0x00011AB8 internal static IDistributedStoreKey GetBaseKey(AmClusterHandle clusterHandle, DxStoreKeyAccessMode mode) { RegSAM regSam = ClusterDbKey.GetRegSam(mode); AmClusterRegkeyHandle clusterKey = ClusapiMethods.GetClusterKey(clusterHandle, regSam); if (clusterKey == null || clusterKey.IsInvalid) { throw AmExceptionHelper.ConstructClusterApiExceptionNoErr("GetClusterKey", new object[0]); } return(new ClusterDbKey(clusterKey, clusterHandle)); }