⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exewin.htm

📁 exewin文件格式
💻 HTM
📖 第 1 页 / 共 2 页
字号:
    <br>
    <br>
    <br>
    typedef struct _typeinfo {<br>
    word rttypeid;<br>
    word rtresourcecount;<br>
    dword rtreserved;<br>
    nameinfo rtnameinfo[];<br>
    } typeinfo;<br>
    <br>
    following are the members in the typeinfo structure: <br>
    <br>
    rttypeid&nbsp;&nbsp;&nbsp; specifies the type identifier of the resource. this integer 
    value is either a resource-type value or an offset <br>
    to a resource-type name. if the high bit in this member is set (0x8000), the value is one 
    of the following <br>
    resource-type values: <br>
    <br>
    value&nbsp;&nbsp;&nbsp; resource type<br>
    <br>
    rt_accelerator&nbsp;&nbsp;&nbsp; accelerator table <br>
    rt_bitmap&nbsp;&nbsp;&nbsp; bitmap <br>
    rt_cursor&nbsp;&nbsp;&nbsp; cursor <br>
    rt_dialog&nbsp;&nbsp;&nbsp; dialog box <br>
    rt_font&nbsp;&nbsp;&nbsp; font component <br>
    rt_fontdir&nbsp;&nbsp;&nbsp; font directory <br>
    rt_group_cursor&nbsp;&nbsp;&nbsp; cursor directory <br>
    rt_group_icon&nbsp;&nbsp;&nbsp; icon directory <br>
    rt_icon&nbsp;&nbsp;&nbsp; icon <br>
    rt_menu&nbsp;&nbsp;&nbsp; menu <br>
    rt_rcdata&nbsp;&nbsp;&nbsp; resource data <br>
    rt_string&nbsp;&nbsp;&nbsp; string table <br>
    <br>
    if the high bit of the value in this member is not set, the value represents an offset, in 
    bytes relative to the <br>
    beginning of the resource table, to a name in the rscresourcenames member. <br>
    <br>
    rtresourcecount&nbsp;&nbsp;&nbsp; specifies the number of resources of this type in the 
    executable file. <br>
    rtreserved&nbsp;&nbsp;&nbsp; reserved. <br>
    rtnameinfo&nbsp;&nbsp;&nbsp; specifies an array of nameinfo structures containing 
    information about individual resources. the <br>
    rtresourcecount member specifies the number of structures in the array. <br>
    <br>
    name information<br>
    <br>
    the nameinfo structure has the following form: <br>
    <br>
    <br>
    <br>
    typedef struct _nameinfo {<br>
    word rnoffset;<br>
    word rnlength;<br>
    word rnflags;<br>
    word rnid;<br>
    word rnhandle;<br>
    word rnusage;<br>
    } nameinfo;<br>
    <br>
    following are the members in the nameinfo structure: <br>
    <br>
    rnoffset&nbsp;&nbsp;&nbsp; specifies an offset to the contents of the resource data 
    (relative to the beginning of the file). the offset is in terms of <br>
    alignment units specified by the rscalignshift member at the beginning of the resource 
    table. <br>
    rnlength&nbsp;&nbsp;&nbsp; specifies the resource length, in bytes. <br>
    rnflags&nbsp;&nbsp;&nbsp; specifies whether the resource is fixed, preloaded, or 
    shareable. this member can be one or more of the following <br>
    values: <br>
    <br>
    value&nbsp;&nbsp;&nbsp; meaning<br>
    <br>
    0x0010&nbsp;&nbsp;&nbsp; resource is movable (moveable). otherwise, it is fixed. <br>
    0x0020&nbsp;&nbsp;&nbsp; resource can be shared (pure). <br>
    0x0040&nbsp;&nbsp;&nbsp; resource is preloaded (preload). otherwise, it is loaded on 
    demand. <br>
    <br>
    rnid&nbsp;&nbsp;&nbsp; specifies or points to the resource identifier. if the identifier 
    is an integer, the high bit is set (8000h). otherwise, it is an <br>
    offset to a resource string, relative to the beginning of the resource table. <br>
    rnhandle&nbsp;&nbsp;&nbsp; reserved. <br>
    rnusage&nbsp;&nbsp;&nbsp; reserved. <br>
    <br>
    resident-name table<br>
    <br>
    the resident-name table contains strings that identify exported functions in the 
    executable file. as the name implies, these strings <br>
    are resident in system memory and are never discarded. the resident-name strings are 
    case-sensitive and are not <br>
    null-terminated. the following list summarizes the values found in the resident-name table 
    (the locations are relative to the <br>
    beginning of each entry): <br>
    <br>
    location&nbsp;&nbsp;&nbsp; description<br>
    <br>
    00h&nbsp;&nbsp;&nbsp; specifies the length of a string. if there are no more strings in 
    the table, this value is zero. <br>
    01h - xxh&nbsp;&nbsp;&nbsp; specifies the resident-name text. this string is 
    case-sensitive and is not null-terminated. <br>
    xxh + 01h&nbsp;&nbsp;&nbsp; specifies an ordinal number that identifies the string. this 
    number is an index into the entry table. <br>
    <br>
    the first string in the resident-name table is the module name. <br>
    <br>
    module-reference table<br>
    <br>
    the module-reference table contains offsets for module names stored in the imported-name 
    table. each entry in this table is 2 <br>
    bytes long. <br>
    <br>
    imported-name table<br>
    <br>
    the imported-name table contains the names of modules that the executable file imports. 
    each entry contains two parts: a single <br>
    byte that specifies the length of the string and the string itself. the strings in this 
    table are not null-terminated. <br>
    <br>
    entry table<br>
    <br>
    the entry table contains bundles of entry points from the executable file (the linker 
    generates each bundle). the numbering <br>
    system for these ordinal values is 1-based--that is, the ordinal value corresponding to 
    the first entry point is 1. <br>
    the linker generates the densest possible bundles under the restriction that it cannot 
    reorder the entry points. this restriction is <br>
    necessary because other executable files may refer to entry points within a given bundle 
    by their ordinal values. <br>
    the entry-table data is organized by bundle, each of which begins with a 2-byte header. 
    the first byte of the header specifies the <br>
    number of entries in the bundle (a value of 00h designates the end of the table). the 
    second byte specifies whether the <br>
    corresponding segment is movable or fixed. if the value in this byte is 0ffh, the segment 
    is movable. if the value in this byte is <br>
    0feh, the entry does not refer to a segment but refers, instead, to a constant defined 
    within the module. if the value in this byte is <br>
    neither 0ffh nor 0feh, it is a segment index. <br>
    <br>
    for movable segments, each entry consists of 6 bytes and has the following form: <br>
    <br>
    location&nbsp;&nbsp;&nbsp; description<br>
    <br>
    00h&nbsp;&nbsp;&nbsp; specifies a byte value. this value can be a combination of the 
    following bits: <br>
    <br>
    bit(s)&nbsp;&nbsp;&nbsp; meaning<br>
    <br>
    0&nbsp;&nbsp;&nbsp; if this bit is set, the entry is exported. <br>
    1&nbsp;&nbsp;&nbsp; if this bit is set, the segment uses a global (shared) data segment. <br>
    3-7&nbsp;&nbsp;&nbsp; if the executable file contains code that performs ring transitions, 
    these bits specify the number of words <br>
    that compose the stack. at the time of the ring transition, these words must be copied 
    from one ring to the <br>
    other. <br>
    <br>
    01h&nbsp;&nbsp;&nbsp; specifies an int 3fh instruction. <br>
    03h&nbsp;&nbsp;&nbsp; specifies the segment number. <br>
    04h&nbsp;&nbsp;&nbsp; specifies the segment offset. <br>
    <br>
    for fixed segments, each entry consists of 3 bytes and has the following form: <br>
    <br>
    location&nbsp;&nbsp;&nbsp; description<br>
    <br>
    00h&nbsp;&nbsp;&nbsp; specifies a byte value. this value can be a combination of the 
    following bits: <br>
    <br>
    bit(s)&nbsp;&nbsp;&nbsp; meaning<br>
    <br>
    0&nbsp;&nbsp;&nbsp; if this bit is set, the entry is exported. <br>
    1&nbsp;&nbsp;&nbsp; if this bit is set, the entry uses a global (shared) data segment. 
    (this may be set only for singledata <br>
    library modules.) <br>
    3-7&nbsp;&nbsp;&nbsp; if the executable file contains code that performs ring transitions, 
    these bits specify the number of words <br>
    that compose the stack. at the time of the ring transition, these words must be copied 
    from one ring to the <br>
    other. <br>
    <br>
    01h&nbsp;&nbsp;&nbsp; specifies an offset. <br>
    <br>
    nonresident-name table<br>
    <br>
    the nonresident-name table contains strings that identify exported functions in the 
    executable file. as the name implies, these <br>
    strings are not always resident in system memory and are discardable. the nonresident-name 
    strings are case-sensitive; they <br>
    are not null-terminated. the following list summarizes the values found in the 
    nonresident-name table (the specified locations are <br>
    relative to the beginning of each entry): <br>
    <br>
    location&nbsp;&nbsp;&nbsp; description<br>
    <br>
    00h&nbsp;&nbsp;&nbsp; specifies the length, in bytes, of a string. if this byte is 00h, 
    there are no more strings in the table. <br>
    01h - xxh&nbsp;&nbsp;&nbsp; specifies the nonresident-name text. this string is 
    case-sensitive and is not null-terminated. <br>
    xx + 01h&nbsp;&nbsp;&nbsp; specifies an ordinal number that is an index to the entry 
    table. <br>
    <br>
    the first name that appears in the nonresident-name table is the module description string 
    (which was specified in the <br>
    module-definition file). <br>
    <br>
    code segments and relocation data<br>
    <br>
    code and data segments follow the windows header. some of the code segments may contain 
    calls to functions in other <br>
    segments and may, therefore, require relocation data to resolve those references. this 
    relocation data is stored in a relocation <br>
    table that appears immediately after the code or data in the segment. the first 2 bytes in 
    this table specify the number of <br>
    relocation items the table contains. a relocation item is a collection of bytes specifying 
    the following information: <br>
    <br>
    &nbsp;&nbsp;&nbsp; address type (segment only, offset only, segment and offset) <br>
    <br>
    &nbsp;&nbsp;&nbsp; relocation type (internal reference, imported ordinal, imported name) <br>
    <br>
    &nbsp;&nbsp;&nbsp; segment number or ordinal identifier (for internal references) <br>
    <br>
    &nbsp;&nbsp;&nbsp; reference-table index or function ordinal number (for imported 
    ordinals) <br>
    <br>
    &nbsp;&nbsp;&nbsp; reference-table index or name-table offset (for imported names) <br>
    <br>
    each relocation item contains 8 bytes of data, the first byte of which specifies one of 
    the following relocation-address types: <br>
    <br>
    value&nbsp;&nbsp;&nbsp; meaning<br>
    <br>
    0&nbsp;&nbsp;&nbsp; low byte at the specified offset <br>
    2&nbsp;&nbsp;&nbsp; 16-bit selector <br>
    3&nbsp;&nbsp;&nbsp; 32-bit pointer <br>
    5&nbsp;&nbsp;&nbsp; 16-bit offset <br>
    11&nbsp;&nbsp;&nbsp; 48-bit pointer <br>
    13&nbsp;&nbsp;&nbsp; 32-bit offset <br>
    <br>
    the second byte specifies one of the following relocation types: <br>
    <br>
    value&nbsp;&nbsp;&nbsp; meaning<br>
    <br>
    0&nbsp;&nbsp;&nbsp; internal reference <br>
    1&nbsp;&nbsp;&nbsp; imported ordinal <br>
    2&nbsp;&nbsp;&nbsp; imported name <br>
    3&nbsp;&nbsp;&nbsp; osfixup <br>
    <br>
    the third and fourth bytes specify the offset of the relocation item within the segment. <br>
    if the relocation type is imported ordinal, the fifth and sixth bytes specify an index to 
    a module's reference table and the seventh <br>
    and eighth bytes specify a function ordinal value. <br>
    if the relocation type is imported name, the fifth and sixth bytes specify an index to a 
    module's reference table and the seventh and <br>
    eighth bytes specify an offset to an imported-name table. <br>
    if the relocation type is internal reference and the segment is fixed, the fifth byte 
    specifies the segment number, the sixth byte is <br>
    zero, and the seventh and eighth bytes specify an offset to the segment. if the relocation 
    type is internal reference and the segment <br>
    is movable, the fifth byte specifies 0ffh, the sixth byte is zero; and the seventh and 
    eighth bytes specify an ordinal value found in <br>
    the segment's entry table. </td>
  </tr>
</table>
</center></div>

<p align="center"><a href="../index.htm">返回</a></p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -