private void FindHeader(Image_Resource_Directory resourceDir) { int entryCount = resourceDir.NumberOfIdEntries + resourceDir.NumberOfNamedEntries; for (int i = 0; i < entryCount; i++) { Image_Resource_Directory_Entry entry = resourceDir.ImageResourceDirectoryEntries[i]; if ((entry.OffsetToData & 0x80000000) != 0) { Image_Resource_Directory child = (Image_Resource_Directory)entry.ChildEntry; FindHeader(child); } else { Image_Resource_Data_Entry data = (Image_Resource_Data_Entry)entry.ChildEntry; ICON_HEADER hd = new ICON_HEADER(data.Data); ICON_DIRECTORY[] ds = new ICON_DIRECTORY[hd.Count]; for (int j = 0; j < ds.Length; j++) { ds[j] = new ICON_DIRECTORY(data.Data, 6 + j * 14); if (ds[j].IConID == this.ID) { Header = hd; Directory = ds[j]; return; } } } } }
public GROUP_ICON(byte[] buff) { Header = new ICON_HEADER(buff); Directories = new ICON_DIRECTORY[Header.Count]; for (int i = 0; i < Directories.Length; i++) { Directories[i] = new ICON_DIRECTORY(buff, 6 + i * 14); } }
public ICON_FILE_HEADER(ICON_HEADER header) { Reserved = header.Reserved; Type = header.Type; Count = 1; }