Changeset 124 for trunk/include/helpers/dosh.h
- Timestamp:
- Dec 17, 2001, 12:21:18 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r123 r124 531 531 typedef struct _NEHEADER 532 532 { 533 CHAR achNE[2]; // 00: "NE" magic 534 BYTE bLinkerVersion; // 02: linker version 535 BYTE bLinkerRevision; // 03: linker revision 536 USHORT usEntryTblOfs; // 04: ofs from this to entrytable 537 USHORT usEntryTblLen; // 06: length of entrytable 538 ULONG ulChecksum; // 08: MS: reserved, OS/2: checksum 539 USHORT usFlags; // 0c: flags 533 CHAR achNE[2]; // 00: "NE" magic ne_magic 534 BYTE bLinkerVersion; // 02: linker version ne_ver 535 BYTE bLinkerRevision; // 03: linker revision ne_rev 536 USHORT usEntryTblOfs; // 04: ofs from this to entrytable ne_enttab 537 USHORT usEntryTblLen; // 06: length of entrytable ne_cbenttab 538 ULONG ulChecksum; // 08: MS: reserved, OS/2: checksum ne_crc 539 USHORT usFlags; // 0c: flags ne_flags 540 540 /* 541 541 #define NENOTP 0x8000 // Not a process == library 542 542 #define NENOTMPSAFE 0x4000 // Process is not multi-processor safe 543 // (Win3.1 SDK: "reserved") 543 544 #define NEIERR 0x2000 // Errors in image 544 545 #define NEBOUND 0x0800 // Bound Family/API 546 // (Win3.1 SDK: "first segment contains code 547 // that loads the application") 545 548 #define NEAPPTYP 0x0700 // Application type mask 549 // (Win3.1 SDK: "reserved") 546 550 #define NENOTWINCOMPAT 0x0100 // Not compatible with P.M. Windowing 551 // (Win3.1 SDK: "reserved") 547 552 #define NEWINCOMPAT 0x0200 // Compatible with P.M. Windowing 553 // (Win3.1 SDK: "reserved") 548 554 #define NEWINAPI 0x0300 // Uses P.M. Windowing API 555 // (Win3.1 SDK: "reserved") 549 556 #define NEFLTP 0x0080 // Floating-point instructions 550 557 #define NEI386 0x0040 // 386 instructions … … 552 559 #define NEI086 0x0010 // 8086 instructions 553 560 #define NEPROT 0x0008 // Runs in protected mode only 561 // (Win3.1 SDK: "reserved") 554 562 #define NEPPLI 0x0004 // Per-Process Library Initialization 563 // (Win3.1 SDK: "reserved") 555 564 #define NEINST 0x0002 // Instance data 556 565 #define NESOLO 0x0001 // Solo data (single data) 557 566 */ 558 USHORT usAutoDataSegNo; // 0e: auto-data seg no. 559 USHORT usInitlHeapSize; // 10: initl. heap size 560 USHORT usInitlStackSize; // 12: initl. stack size 561 ULONG ulCSIP; // 14: CS:IP 562 ULONG ulSSSP; // 18: SS:SP 563 USHORT usSegTblEntries; // 1c: segment tbl entry count 564 USHORT usModuleTblEntries; // 1e: module ref. table entry count 565 USHORT usNonResdTblLen; // 20: non-resd. name tbl length 566 USHORT usSegTblOfs; // 22: segment tbl ofs 567 USHORT usResTblOfs; // 24: resource tbl ofs 568 USHORT usResdNameTblOfs; // 26: resd. name tbl ofs 569 USHORT usModRefTblOfs; // 28: module ref. table ofs 570 USHORT usImportTblOfs; // 2a: import tbl ofs 571 ULONG ulNonResdTblOfs; // 2c: non-resd. name tbl ofs 572 USHORT usMoveableEntries; // 30: moveable entry pts. count 573 USHORT usLogicalSectShift; // 32: logcl. sector shift 574 USHORT usResSegmCount; // 34: resource segm. count 575 BYTE bTargetOS; // 36: target OS (NEOS_* flags) 576 BYTE bFlags2; // 37: addtl. flags 567 USHORT usAutoDataSegNo; // 0e: auto-data seg no. ne_autodata 568 // (Win3.1 SDK: "0 if both NEINST and NESOLO are cleared") 569 USHORT usInitlHeapSize; // 10: initl. heap size ne_heap 570 // (Win3.1 SDK: "0 if no local allocation") 571 USHORT usInitlStackSize; // 12: initl. stack size ne_stack 572 // (Win3.1 SDK: "0 if SS != DS") 573 ULONG ulCSIP; // 14: CS:IP ne_csip 574 ULONG ulSSSP; // 18: SS:SP ne_sssp 575 USHORT usSegTblEntries; // 1c: segment tbl entry count ne_cseg 576 USHORT usModuleTblEntries; // 1e: module ref. table entry count ne_cmod 577 USHORT usNonResdTblLen; // 20: non-resd. name tbl length ne_cbnrestab 578 USHORT usSegTblOfs; // 22: segment tbl ofs ne_segtab 579 // (from start of NEHEADER) 580 USHORT usResTblOfs; // 24: resource tbl ofs ne_rsrctab 581 // (from start of NEHEADER) 582 USHORT usResdNameTblOfs; // 26: resd. name tbl ofs ne_restab 583 // (from start of NEHEADER) 584 USHORT usModRefTblOfs; // 28: module ref. table ofs ne_modtab 585 // (from start of NEHEADER) 586 USHORT usImportTblOfs; // 2a: import name tbl ofs ne_imptab 587 // (from start of NEHEADER) 588 ULONG ulNonResdTblOfs; // 2c: non-resd. name tbl ofs ne_nrestab 589 // (from start of EXE!) 590 USHORT usMoveableEntries; // 30: moveable entry points count ne_cmovent 591 USHORT usLogicalSectShift; // 32: logcl. sector shift ne_align 592 // (Win3.1 SDK: "typically 4, but default is 9") 593 USHORT usResSegmCount; // 34: resource segm. count ne_cres 594 BYTE bTargetOS; // 36: target OS (NEOS_* flags) ne_exetyp 595 BYTE bFlags2; // 37: addtl. flags ne_flagsothers 596 // Win3.1 SDK: 597 // bit 1 --> Win2.x, but runs in Win3.x protected mode 598 // bit 2 --> Win2.x that supports prop. fonts 599 // bit 3 --> exec contains fastload area 600 /* 601 #define NELONGNAMES 0x01 602 #define NEWINISPROT 0x02 603 #define NEWINGETPROPFON 0x04 604 #define NEWLOAPPL 0x80 605 */ 606 // the following are not listed in newexe.h, but are documented for Win3.x 577 607 USHORT usFastLoadOfs; // 38: fast-load area ofs 578 608 USHORT usFastLoadLen; // 3a: fast-load area length … … 780 810 } LXITER, *PLXITER; 781 811 812 /* 813 *@@ OS2NERESTBLENTRY: 814 * OS/2 NE resource table entry. 815 * 816 *@@added V0.9.16 (2001-12-08) [umoeller] 817 */ 818 819 typedef struct _OS2NERESTBLENTRY 820 { 821 USHORT usType; 822 USHORT usID; 823 } OS2NERESTBLENTRY, *POS2NERESTBLENTRY; 824 825 /* 826 *@@ OS2NESEGMENT: 827 * OS/2 NE segment definition. 828 * 829 *@@added V0.9.16 (2001-12-08) [umoeller] 830 */ 831 832 typedef struct _OS2NESEGMENT // New .EXE segment table entry 833 { 834 unsigned short ns_sector; // File sector of start of segment 835 unsigned short ns_cbseg; // Number of bytes in file 836 unsigned short ns_flags; // Attribute flags 837 unsigned short ns_minalloc; // Minimum allocation in bytes 838 } OS2NESEGMENT, *POS2NESEGMENT; 839 782 840 #pragma pack() 783 841 … … 902 960 OBJECTPAGETABLEENTRY *pObjPageTbl; // pLXHeader->ulPageCount 903 961 962 // the following fields are set after doshLoadOS2NEMaps 963 BOOL fOS2NEMapsLoaded; 964 POS2NERESTBLENTRY paOS2NEResTblEntry; 965 POS2NESEGMENT paOS2NESegments; 966 904 967 #endif 905 968 } EXECUTABLE, *PEXECUTABLE; … … 970 1033 971 1034 VOID doshFreeLXMaps(PEXECUTABLE pExec); 1035 1036 APIRET doshLoadOS2NEMaps(PEXECUTABLE pExec); 1037 1038 VOID doshFreeNEMaps(PEXECUTABLE pExec); 972 1039 973 1040 APIRET doshExecClose(PEXECUTABLE *ppExec);
Note:
See TracChangeset
for help on using the changeset viewer.