嘿嘿,不介意的话,源代码……,
[email protected]

解决方案 »

  1.   

    這是msdn里說的。6.8.4. Resource Data Entry
    Each Resource Data Entry describes an actual unit of raw data in the Resource Data area, and has the following format:Offset Size Field Description 
    0       4   Data RVA Address of a unit of resource data in the Resource Data area. 
    4       4   Size Size, in bytes, of the resource data pointed to by the Data RVA field. 
    8       4   Codepage Code page used to decode code point values within the resource data. Typically, the code page would be the Unicode code page. 
    12      4   Reserved (must be set to 0) 
    找到icon的Data RVA就可以了。
      

  2.   

    问题就处在这!,如何找到icon对应Resource Data Entry
      

  3.   

    到MSDN里查portable executable6.8.2. Resource Directory Entries
    The directory entries make up the rows of a table. Each Resource Directory Entry has the following format. Note that whether the entry is a Name or ID entry is indicated by the Resource Directory Table, which indicates how many Name and ID entries follow it (remember that all the Name entries precede all the ID entries for the table). All entries for the table are sorted in ascending order: the Name entries by case-insensitive string, and the ID entries by numeric value.Offset Size Field Description 
    0 4 Name RVA Address of string that gives the Type, Name, or Language identifier, depending on level of table. 
    0 4 Integer ID 32-bit integer that identifies Type, Name, or Language. 
    4 4 Data Entry RVA High bit 0. Address of a Resource Data Entry (a leaf).  (這一行)
    4 4 Subdirectory RVA High bit 1. Lower 31 bits are the address of another Resource Directory Table (the next level down).