예제 #1
0
        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;
                    CURSOR_HEADER             hd   = new CURSOR_HEADER(data.Data);
                    CURSOR_DIRECTORY[]        cds  = new CURSOR_DIRECTORY[hd.Count];
                    for (int j = 0; j < cds.Length; j++)
                    {
                        cds[j] = new CURSOR_DIRECTORY(data.Data, 6 + j * 14);
                        if (cds[j].CursorID == this.ID)
                        {
                            Header    = hd;
                            Directory = cds[j];
                            return;
                        }
                    }
                }
            }
        }
예제 #2
0
 public GROUP_CURSOR(byte[] buff)
 {
     Header      = new CURSOR_HEADER(buff);
     Directories = new CURSOR_DIRECTORY[Header.Count];
     for (int i = 0; i < Directories.Length; i++)
     {
         Directories[i] = new CURSOR_DIRECTORY(buff, 6 + i * 14);
     }
 }
예제 #3
0
 public CURSOR_FILE_HEADER(CURSOR_HEADER header)
 {
     Reserved = header.Reserved;
     Type     = header.Type;
     Count    = 1;
 }