Exemplo n.º 1
0
        // Token: 0x060001E2 RID: 482 RVA: 0x0000896C File Offset: 0x00006B6C
        public long GetHungNodesMask(out int currentGumId)
        {
            currentGumId = 0;
            long result = 0L;

            using (AmClusterRawData nodeControlData = this.GetNodeControlData(AmClusterNodeControlCode.CLUSCTL_NODE_GET_STUCK_NODES, 1024U))
            {
                IntPtr intPtr = nodeControlData.Buffer;
                currentGumId = Marshal.ReadInt32(intPtr);
                intPtr      += Marshal.SizeOf(typeof(int));
                result       = Marshal.ReadInt64(intPtr);
            }
            return(result);
        }
Exemplo n.º 2
0
        public bool IsCoreGroup()
        {
            bool result = false;

            using (AmClusterRawData groupControlData = this.GetGroupControlData(AmClusterGroupControlCode.CLUSCTL_GROUP_GET_FLAGS))
            {
                int num = groupControlData.ReadInt32();
                if ((num & 1) == 1)
                {
                    result = true;
                }
            }
            return(result);
        }
Exemplo n.º 3
0
        // Token: 0x060001D3 RID: 467 RVA: 0x00008744 File Offset: 0x00006944
        public string GetNodeIdentifier()
        {
            string text = string.Empty;

            using (AmClusterRawData nodeControlData = this.GetNodeControlData(AmClusterNodeControlCode.CLUSCTL_NODE_GET_ID, 1024U))
            {
                text = nodeControlData.ReadString();
                AmTrace.Debug("GetNodeIdentifier: Node '{0}' is identified by '{1}'.", new object[]
                {
                    this.Name,
                    text
                });
            }
            return(text);
        }
        // Token: 0x06000192 RID: 402 RVA: 0x00007384 File Offset: 0x00005584
        public string GetNodeName()
        {
            string text = string.Empty;

            using (AmClusterRawData netInterfaceControlData = this.GetNetInterfaceControlData(AmClusterNetInterfaceControlCode.CLUSCTL_NETINTERFACE_GET_NODE))
            {
                text = netInterfaceControlData.ReadString();
                AmTrace.Debug("GetNetInterfaceIdentifier: NetInterface '{0}' is owned by '{1}'.", new object[]
                {
                    this.Name,
                    text
                });
            }
            return(text);
        }
Exemplo n.º 5
0
        // Token: 0x0600022F RID: 559 RVA: 0x0000A210 File Offset: 0x00008410
        public MyType GetCommonROProperty <MyType>(string key)
        {
            MyType result = default(MyType);

            try
            {
                using (AmClusterRawData resourceControlData = this.GetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_GET_RO_COMMON_PROPERTIES))
                {
                    AmClusterPropList amClusterPropList = new AmClusterPropList(resourceControlData.Buffer, resourceControlData.Size);
                    result = amClusterPropList.Read <MyType>(key);
                }
            }
            catch (ClusterApiException arg)
            {
                AmClusterResource.Tracer.TraceDebug <string, string, ClusterApiException>((long)this.GetHashCode(), "GetCommonROProperty( {0} ) on '{1}' encountered an exception: {2}", key, this.Name, arg);
            }
            return(result);
        }
Exemplo n.º 6
0
        // Token: 0x060001AE RID: 430 RVA: 0x00007A98 File Offset: 0x00005C98
        public MyType GetPrivateProperty <MyType>(string key)
        {
            MyType result = default(MyType);

            try
            {
                using (AmClusterRawData networkControlData = this.GetNetworkControlData(AmClusterNetworkControlCode.CLUSCTL_NETWORK_GET_PRIVATE_PROPERTIES))
                {
                    AmClusterPropList amClusterPropList = new AmClusterPropList(networkControlData.Buffer, networkControlData.Size);
                    result = amClusterPropList.Read <MyType>(key);
                }
            }
            catch (ClusterApiException arg)
            {
                AmClusterNetwork.Tracer.TraceDebug <string, string, ClusterApiException>((long)this.GetHashCode(), "GetPrivateProperty( {0} ) on '{1}' encountered an exception: {2}", key, this.Name, arg);
            }
            return(result);
        }
Exemplo n.º 7
0
        // Token: 0x06000245 RID: 581 RVA: 0x0000AAC8 File Offset: 0x00008CC8
        private AmClusterRawData GetResourceControlData(AmClusterResourceControlCode code)
        {
            uint             num = 1024U;
            AmClusterRawData amClusterRawData = AmClusterRawData.Allocate(num);
            int num2 = ClusapiMethods.ClusterResourceControl(this.Handle, IntPtr.Zero, code, IntPtr.Zero, 0U, amClusterRawData.Buffer, num, out num);

            if (num2 == 234)
            {
                amClusterRawData.Dispose();
                amClusterRawData = AmClusterRawData.Allocate(num);
                num2             = ClusapiMethods.ClusterResourceControl(this.Handle, IntPtr.Zero, code, IntPtr.Zero, 0U, amClusterRawData.Buffer, num, out num);
            }
            if (num2 != 0)
            {
                amClusterRawData.Dispose();
                throw AmExceptionHelper.ConstructClusterApiException(num2, "ClusterResourceControl(controlcode={0})", new object[]
                {
                    code
                });
            }
            return(amClusterRawData);
        }