Exemplo n.º 1
0
        /// <summary>
        /// Read from a stream and get access control info, if possible
        /// </summary>
        /// <param name="reader">BinaryReader representing the input stream</param>
        /// <returns>Access control info object, null on error</returns>
        public static AccessControlInfo Read(BinaryReader reader)
        {
            AccessControlInfo aci = new AccessControlInfo();

            try
            {
                aci.ARM11LocalSystemCapabilities = ARM11LocalSystemCapabilities.Read(reader);
                aci.ARM11KernelCapabilities      = ARM11KernelCapabilities.Read(reader);
                aci.ARM9AccessControl            = ARM9AccessControl.Read(reader);
                return(aci);
            }
            catch
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Read from a stream and get ARM11 kernel capabilities, if possible
        /// </summary>
        /// <param name="reader">BinaryReader representing the input stream</param>
        /// <returns>ARM11 kernel capabilities object, null on error</returns>
        public static ARM11KernelCapabilities Read(BinaryReader reader)
        {
            ARM11KernelCapabilities kc = new ARM11KernelCapabilities();

            try
            {
                kc.Descriptors = new byte[28][];
                for (int i = 0; i < 28; i++)
                {
                    kc.Descriptors[i] = reader.ReadBytes(4);
                }

                kc.Reserved = reader.ReadBytes(0x10);
                return(kc);
            }
            catch
            {
                return(null);
            }
        }