예제 #1
0
		private static void ExtractResources(ResourceDirectoryEntry root, byte[] buf)
		{
			ByteReader br = new ByteReader(buf, 0, buf.Length);
			while (br.Length >= 32)
			{
				br.Align(4);
				RESOURCEHEADER hdr = new RESOURCEHEADER(br);
				if (hdr.DataSize != 0)
				{
					root[hdr.TYPE][hdr.NAME][new OrdinalOrName(hdr.LanguageId)].Data = ByteBuffer.Wrap(br.ReadBytes(hdr.DataSize));
				}
			}
		}
예제 #2
0
        internal void ExtractResources(byte[] buf)
        {
            ByteReader br = new ByteReader(buf, 0, buf.Length);

            while (br.Length >= 32)
            {
                br.Align(4);
                RESOURCEHEADER hdr = new RESOURCEHEADER(br);
                if (hdr.DataSize != 0)
                {
                    root[hdr.TYPE][hdr.NAME][new OrdinalOrName(hdr.LanguageId)].Data = ByteBuffer.Wrap(br.ReadBytes(hdr.DataSize));
                }
            }
        }