Ignore:
Timestamp:
Apr 16, 2001, 9:29:52 PM (24 years ago)
Author:
umoeller
Message:

Various fixes for V0.9.10.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/dosh.h

    r56 r59  
    1313 */
    1414
    15 /*      This file Copyright (C) 1997-2000 Ulrich M”ller,
     15/*      This file Copyright (C) 1997-2001 Ulrich M”ller,
    1616 *                                        Dmitry A. Steklenev.
    1717 *      This file is part of the "XWorkplace helpers" source package.
     
    417417     *
    418418     *@@changed V0.9.7 (2000-12-20) [umoeller]: fixed NE offset
     419     *@@changed V0.9.9 (2001-04-06) [lafaix]: additional fields defined
    419420     */
    420421
     
    436437         USHORT usRelocTableOfs;        // 18: reloc table ofs.header (Win: >= 0x40)
    437438         USHORT usOverlayNo;            // 1a: overlay no.
    438          ULONG  ulLinkerVersion;        // 1c: linker version (if 0x18 > 0x28)
    439          ULONG  ulUnused1;              // 20: unused
    440          ULONG  ulUnused2;              // 24: exe.h says the following fields are
    441          ULONG  ulUnused3;              // 28:   'behavior bits'
    442          ULONG  ulUnused4;              // 3c:
     439         USHORT usLinkerVersion;        // 1c: linker version (if 0x18 > 0x28)
     440         USHORT usUnused1;              // 1e: unused
     441         USHORT usBehaviorBits;         // 20: exe.h says this field contains
     442                                        //     'behavior bits'
     443         USHORT usUnused2;              // 22: unused
     444         USHORT usOEMIdentifier;        // 24: OEM identifier
     445         USHORT usOEMInformation;       // 26: OEM information
     446         ULONG  ulUnused3;              // 28:
     447         ULONG  ulUnused4;              // 2c:
    443448         ULONG  ulUnused5;              // 30:
    444449         ULONG  ulUnused6;              // 34:
    445450         ULONG  ulUnused7;              // 38:
    446          ULONG  ulNewHeaderOfs;         // new header ofs (if 0x18 > 0x40)
     451         ULONG  ulNewHeaderOfs;         // 3c: new header ofs (if 0x18 > 0x40)
    447452                    // fixed this from USHORT, thanks Martin Lafaix
    448453                    // V0.9.7 (2000-12-20) [umoeller]
     
    461466     *      which comes after the DOS header in the
    462467     *      EXE file (at DOSEXEHEADER.ulNewHeaderOfs).
     468     *
     469     *@@changed V0.9.9 (2001-04-06) [lafaix]: fixed typo in usMoveableEntries
    463470     */
    464471
     
    486493        USHORT    usImportTblOfs;       // 2a: import tbl ofs
    487494        ULONG     ulNonResdTblOfs;      // 2c: non-resd. name tbl ofs
    488         USHORT    usMoveableEntires;    // 30: moveable entry pts. count
     495        USHORT    usMoveableEntries;    // 30: moveable entry pts. count
    489496        USHORT    usLogicalSectShift;   // 32: logcl. sector shift
    490497        USHORT    usResSegmCount;       // 34: resource segm. count
     
    502509     *      which comes after the DOS header in the
    503510     *      EXE file (at DOSEXEHEADER.ulNewHeaderOfs).
     511     *
     512     *@@changed V0.9.9 (2001-04-06) [lafaix]: fixed auto data object and ulinstanceDemdCnt
    504513     */
    505514
     
    549558        ULONG     ulNonResdNameTblLen;  // 8c: non-resdnt name tbl length
    550559        ULONG     ulNonResdNameTblCS;   // 90: non-res name tbl checksum
    551         ULONG     ulAutoDataSegObjCnt;  // 94: auto dataseg object count
     560        ULONG     ulAutoDataSegObj;     // 94: auto dataseg object
    552561        ULONG     ulDebugOfs;           // 98: debug info ofs
    553562        ULONG     ulDebugLen;           // 9c: debug info length
    554563        ULONG     ulInstancePrelCnt;    // a0: instance preload count
    555         ULONG     ulinstanceDemdCnt;    // a0: instance demand count
     564        ULONG     ulInstanceDemdCnt;    // a0: instance demand count
    556565        ULONG     ulHeapSize16;         // a8: heap size (16-bit)
    557566        ULONG     ulStackSize;          // ac: stack size
    558567    } LXHEADER, *PLXHEADER;
     568
     569    /*
     570     *@@ PEHEADER:
     571     *      portable executable (PE) header format,
     572     *      which comes after the DOS header in the
     573     *      EXE file (at DOSEXEHEADER.ulNewHeaderOfs).
     574     *
     575     *@@added V0.9.10 (2001-04-08) [lafaix]
     576     */
     577
     578    typedef struct _PEHEADER
     579    {
     580        // standard header
     581        ULONG     ulSignature;          // 00: 'P', 'E', 0, 0
     582        USHORT    usCPU;                // 04: CPU type
     583        USHORT    usObjCount;           // 06: number of object entries
     584        ULONG     ulTimeDateStamp;      // 08: store the time and date the
     585                                        //     file was created or modified
     586                                        //     by the linker
     587        ULONG     ulReserved1;          // 0c: reserved
     588        ULONG     ulReserved2;          // 10: reserved
     589        USHORT    usHeaderSize;         // 14: number of remaining bytes after
     590                                        //     usImageFlags
     591        USHORT    usImageFlags;         // 16: flags bits for the image
     592
     593        // optional header (always present in valid Win32 files)
     594        USHORT    usReserved3;          // 18: reserved
     595        USHORT    usLinkerMajor;        // 1a: linker major version number
     596        USHORT    usLinkerMinor;        // 1c: linker minor version number
     597        USHORT    usReserved4;          // 1e: reserved
     598        ULONG     ulReserved5;          // 20: reserved
     599        ULONG     ulReserved6;          // 24: reserved
     600        ULONG     ulEntryPointRVA;      // 28: entry point relative virtual address
     601        ULONG     ulReserved7;          // 2c: reserved
     602        ULONG     ulReserved8;          // 30: reserved
     603        ULONG     ulImageBase;          // 34:
     604        ULONG     ulObjectAlign;        // 38:
     605        ULONG     ulFileAlign;          // 3c:
     606        USHORT    usOSMajor;            // 40:
     607        USHORT    usOSMinor;            // 42:
     608        USHORT    usUserMajor;          // 44:
     609        USHORT    usUserMinor;          // 46:
     610        USHORT    usSubSystemMajor;     // 48:
     611        USHORT    usSubSystemMinor;     // 4a:
     612        ULONG     ulReserved9;          // 4c: reserved
     613        ULONG     ulImageSize;          // 50:
     614        ULONG     ulHeaderSize;         // 54:
     615        ULONG     ulFileChecksum;       // 58:
     616        USHORT    usSubSystem;          // 5c:
     617        USHORT    usDLLFlags;           // 5e:
     618        ULONG     ulStackReserveSize;   // 60:
     619        ULONG     ulStackCommitSize;    // 64:
     620        ULONG     ulHeapReserveSize;    // 68:
     621        ULONG     ulHeapCommitSize;     // 6c:
     622        ULONG     ulReserved10;         // 70: reserved
     623        ULONG     ulInterestingRVACount;// 74:
     624        ULONG     aulRVASize[1];        // 78: array of RVA/Size entries
     625    } PEHEADER, *PPEHEADER;
    559626
    560627    #pragma pack()
     
    651718        PLXHEADER           pLXHeader;
    652719        ULONG               cbLXHeader;
     720
     721        // Portable Executable (PE) header, if ulExeFormat == EXEFORMAT_PE
     722        PPEHEADER           pPEHeader;
     723        ULONG               cbPEHeader;
    653724
    654725        // module analysis (always set):
Note: See TracChangeset for help on using the changeset viewer.