Beispiel #1
0
        internal ValueKey[] GetValues(byte[] bytes)
        {
            if (NumberOfValues > 0)
            {
                ValuesList list = new ValuesList(Util.GetSubArray(bytes, (uint)ValuesListOffset, (uint)Math.Abs(BitConverter.ToInt32(bytes, ValuesListOffset))), NumberOfValues);

                ValueKey[] vkArray = new ValueKey[list.Offset.Length];

                for (int i = 0; i < list.Offset.Length; i++)
                {
                    int size = Math.Abs(BitConverter.ToInt32(bytes, (int)list.Offset[i]));
                    vkArray[i] = new ValueKey(Util.GetSubArray(bytes, list.Offset[i], (uint)size), HivePath, Name);
                }

                return(vkArray);
            }

            throw new Exception(string.Format("The key '{0}' has no associated values", this.FullName));
        }
        internal ValueKey[] GetValues(byte[] bytes)
        {
            if (this.NumberOfValues > 0)
            {
                ValuesList list = new ValuesList(NativeMethods.GetSubArray(bytes, (uint)this.ValuesListOffset, (uint)Math.Abs(BitConverter.ToInt32(bytes, this.ValuesListOffset))), this.NumberOfValues);

                ValueKey[] vkArray = new ValueKey[list.Offset.Length];

                for (int i = 0; i < list.Offset.Length; i++)
                {
                    int size = Math.Abs(BitConverter.ToInt32(bytes, (int)list.Offset[i]));
                    vkArray[i] = new ValueKey(NativeMethods.GetSubArray(bytes, list.Offset[i], (uint)size), this.HivePath, this.Name);
                }

                return(vkArray);
            }

            return(null);
        }
        internal ValueKey[] GetValues(byte[] bytes)
        {
            if (this.NumberOfValues > 0)
            {
                ValuesList list = new ValuesList(NativeMethods.GetSubArray(bytes, (uint)this.ValuesListOffset, (uint)Math.Abs(BitConverter.ToInt32(bytes, this.ValuesListOffset))), this.NumberOfValues);

                ValueKey[] vkArray = new ValueKey[list.Offset.Length];

                for (int i = 0; i < list.Offset.Length; i++)
                {
                    int size = Math.Abs(BitConverter.ToInt32(bytes, (int)list.Offset[i]));
                    vkArray[i] = new ValueKey(NativeMethods.GetSubArray(bytes, list.Offset[i], (uint)size), this.HivePath, this.Name);
                }

                return vkArray;
            }

            return null;
        }
        internal ValueKey[] GetValues(byte[] bytes)
        {
            if (NumberOfValues > 0)
            {
                ValuesList list = new ValuesList(Util.GetSubArray(bytes, (uint)ValuesListOffset, (uint)Math.Abs(BitConverter.ToInt32(bytes, ValuesListOffset))), NumberOfValues);

                ValueKey[] vkArray = new ValueKey[list.Offset.Length];

                for (int i = 0; i < list.Offset.Length; i++)
                {
                    int size = Math.Abs(BitConverter.ToInt32(bytes, (int)list.Offset[i]));
                    vkArray[i] = new ValueKey(Util.GetSubArray(bytes, list.Offset[i], (uint)size), HivePath, Name);
                }

                return vkArray;
            }

            throw new Exception(string.Format("The key '{0}' has no associated values", this.FullName));
        }