Changeset 123 for trunk/include/helpers/dosh.h
- Timestamp:
- Dec 14, 2001, 11:41:33 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r121 r123 57 57 PVOID doshMalloc(ULONG cb, 58 58 APIRET *parc); 59 60 APIRET doshAllocArray(ULONG c, 61 ULONG cbArrayItem, 62 PBYTE *ppv, 63 PULONG pcbAllocated); 59 64 60 65 PVOID doshAllocSharedMem(ULONG ulSize, … … 353 358 LONG lOffset, 354 359 ULONG ulMethod, 355 ULONGcb,360 PULONG pcb, 356 361 PBYTE pbData); 357 362 … … 464 469 ********************************************************************/ 465 470 471 #pragma pack(1) 472 466 473 /* 467 474 *@@ DOSEXEHEADER: … … 473 480 */ 474 481 475 #pragma pack(1)476 482 typedef struct _DOSEXEHEADER 477 483 { … … 532 538 ULONG ulChecksum; // 08: MS: reserved, OS/2: checksum 533 539 USHORT usFlags; // 0c: flags 540 /* 541 #define NENOTP 0x8000 // Not a process == library 542 #define NENOTMPSAFE 0x4000 // Process is not multi-processor safe 543 #define NEIERR 0x2000 // Errors in image 544 #define NEBOUND 0x0800 // Bound Family/API 545 #define NEAPPTYP 0x0700 // Application type mask 546 #define NENOTWINCOMPAT 0x0100 // Not compatible with P.M. Windowing 547 #define NEWINCOMPAT 0x0200 // Compatible with P.M. Windowing 548 #define NEWINAPI 0x0300 // Uses P.M. Windowing API 549 #define NEFLTP 0x0080 // Floating-point instructions 550 #define NEI386 0x0040 // 386 instructions 551 #define NEI286 0x0020 // 286 instructions 552 #define NEI086 0x0010 // 8086 instructions 553 #define NEPROT 0x0008 // Runs in protected mode only 554 #define NEPPLI 0x0004 // Per-Process Library Initialization 555 #define NEINST 0x0002 // Instance data 556 #define NESOLO 0x0001 // Solo data (single data) 557 */ 534 558 USHORT usAutoDataSegNo; // 0e: auto-data seg no. 535 559 USHORT usInitlHeapSize; // 10: initl. heap size … … 581 605 ULONG ulModuleVersion; // 0c: module version 582 606 ULONG ulFlags; // 10: module flags 607 /* #define E32NOTP 0x8000L // Library Module - used as NENOTP 608 #define E32NOLOAD 0x2000L // Module not Loadable 609 #define E32PMAPI 0x0300L // Uses PM Windowing API 610 #define E32PMW 0x0200L // Compatible with PM Windowing 611 #define E32NOPMW 0x0100L // Incompatible with PM Windowing 612 #define E32NOEXTFIX 0x0020L // NO External Fixups in .EXE 613 #define E32NOINTFIX 0x0010L // NO Internal Fixups in .EXE 614 #define E32SYSDLL 0x0008L // System DLL, Internal Fixups discarded 615 #define E32LIBINIT 0x0004L // Per-Process Library Initialization 616 #define E32LIBTERM 0x40000000L // Per-Process Library Termination 617 #define E32APPMASK 0x0300L // Application Type Mask 618 */ 583 619 ULONG ulPageCount; // 14: no. of pages in module 584 620 ULONG ulEIPRelObj; // 18: object to which EIP is relative … … 680 716 } PEHEADER, *PPEHEADER; 681 717 718 // additional LX structures 719 720 /* 721 *@@ RESOURCETABLEENTRY: 722 * LX resource table entry. 723 * 724 *@@added V0.9.16 (2001-12-08) [umoeller] 725 */ 726 727 typedef struct _RESOURCETABLEENTRY // rsrc32 728 { 729 unsigned short type; // Resource type 730 unsigned short name; // Resource name 731 unsigned long cb; // Resource size 732 unsigned short obj; // Object number 733 unsigned long offset; // Offset within object 734 } RESOURCETABLEENTRY; 735 736 /* 737 *@@ OBJECTTABLEENTRY: 738 * LX object table entry. 739 * 740 *@@added V0.9.16 (2001-12-08) [umoeller] 741 */ 742 743 typedef struct _OBJECTTABLEENTRY // o32_obj 744 { 745 unsigned long o32_size; // Object virtual size 746 unsigned long o32_base; // Object base virtual address 747 unsigned long o32_flags; // Attribute flags 748 unsigned long o32_pagemap; // Object page map index 749 unsigned long o32_mapsize; // Number of entries in object page map 750 unsigned long o32_reserved; // Reserved 751 } OBJECTTABLEENTRY; 752 753 /* 754 *@@ OBJECTPAGETABLEENTRY: 755 * LX object _page_ table entry, sometimes 756 * referred to as map entry. 757 * 758 *@@added V0.9.16 (2001-12-08) [umoeller] 759 */ 760 761 typedef struct _OBJECTPAGETABLEENTRY // o32_map 762 { 763 unsigned long o32_pagedataoffset; // file offset of page 764 unsigned short o32_pagesize; // # of real bytes of page data 765 unsigned short o32_pageflags; // Per-Page attributes 766 } OBJECTPAGETABLEENTRY; 767 768 /* 769 *@@ LXITER: 770 * iteration Record format for 'EXEPACK'ed pages. 771 * 772 *@@added V0.9.16 (2001-12-08) [umoeller] 773 */ 774 775 typedef struct _LXITER 776 { 777 unsigned short LX_nIter; // number of iterations 778 unsigned short LX_nBytes; // number of bytes 779 unsigned char LX_Iterdata; // iterated data byte(s) 780 } LXITER, *PLXITER; 781 682 782 #pragma pack() 683 684 /*685 *@@ FSYSMODULE:686 *687 *@@added V0.9.9 (2001-03-11) [lafaix]688 */689 690 typedef struct _FSYSMODULE691 {692 CHAR achModuleName[256];693 } FSYSMODULE, *PFSYSMODULE;694 695 /*696 *@@ FSYSFUNCTION:697 *698 *@@added V0.9.9 (2001-03-11) [lafaix]699 */700 701 typedef struct _FSYSFUNCTION702 {703 ULONG ulOrdinal;704 ULONG ulType;705 CHAR achFunctionName[256];706 } FSYSFUNCTION, *PFSYSFUNCTION;707 708 /*709 *@@ FSYSRESOURCE:710 *711 *@@added V0.9.7 (2000-12-18) [lafaix]712 */713 714 typedef struct _FSYSRESOURCE715 {716 ULONG ulID; // resource ID717 ULONG ulType; // resource type718 ULONG ulSize; // resource size in bytes719 ULONG ulFlag; // resource flags720 } FSYSRESOURCE, *PFSYSRESOURCE;721 783 722 784 // object/segment flags (in NE and LX) … … 822 884 // module info substring (if IBM BLDLEVEL format) 823 885 886 #ifndef __STRIP_DOWN_EXECUTABLE__ // for mini stubs in warpin, to reduce code size 824 887 // if pszInfo is extended DESCRIPTION field, the following 825 888 // are set as well: … … 833 896 pszFixpak; 834 897 898 // the following fields are set after doshLoadLXMaps 899 BOOL fLXMapsLoaded; // TRUE after doshLoadLXMaps 900 RESOURCETABLEENTRY *pRsTbl; // pLXHeader->ulResTblCnt 901 OBJECTTABLEENTRY *pObjTbl; // pLXHeader->ulObjCount 902 OBJECTPAGETABLEENTRY *pObjPageTbl; // pLXHeader->ulPageCount 903 904 #endif 835 905 } EXECUTABLE, *PEXECUTABLE; 836 906 … … 838 908 PEXECUTABLE* ppExec); 839 909 840 APIRET doshExecClose(PEXECUTABLE pExec);841 842 910 APIRET doshExecQueryBldLevel(PEXECUTABLE pExec); 911 912 /* 913 *@@ FSYSMODULE: 914 * 915 *@@added V0.9.9 (2001-03-11) [lafaix] 916 */ 917 918 typedef struct _FSYSMODULE 919 { 920 CHAR achModuleName[256]; 921 } FSYSMODULE, *PFSYSMODULE; 843 922 844 923 APIRET doshExecQueryImportedModules(PEXECUTABLE pExec, … … 848 927 APIRET doshExecFreeImportedModules(PFSYSMODULE paModules); 849 928 929 /* 930 *@@ FSYSFUNCTION: 931 * 932 *@@added V0.9.9 (2001-03-11) [lafaix] 933 */ 934 935 typedef struct _FSYSFUNCTION 936 { 937 ULONG ulOrdinal; 938 ULONG ulType; 939 CHAR achFunctionName[256]; 940 } FSYSFUNCTION, *PFSYSFUNCTION; 941 850 942 APIRET doshExecQueryExportedFunctions(PEXECUTABLE pExec, 851 943 PFSYSFUNCTION *ppaFunctions, … … 854 946 APIRET doshExecFreeExportedFunctions(PFSYSFUNCTION paFunctions); 855 947 948 /* 949 *@@ FSYSRESOURCE: 950 * 951 *@@added V0.9.7 (2000-12-18) [lafaix] 952 */ 953 954 typedef struct _FSYSRESOURCE 955 { 956 ULONG ulID; // resource ID 957 ULONG ulType; // resource type 958 ULONG ulSize; // resource size in bytes 959 ULONG ulFlag; // resource flags 960 961 } FSYSRESOURCE, *PFSYSRESOURCE; 962 856 963 APIRET doshExecQueryResources(PEXECUTABLE pExec, 857 964 PFSYSRESOURCE *ppaResources, … … 859 966 860 967 APIRET doshExecFreeResources(PFSYSRESOURCE paResources); 968 969 APIRET doshLoadLXMaps(PEXECUTABLE pExec); 970 971 VOID doshFreeLXMaps(PEXECUTABLE pExec); 972 973 APIRET doshExecClose(PEXECUTABLE *ppExec); 861 974 862 975 APIRET doshSearchPath(PCSZ pcszPath,
Note:
See TracChangeset
for help on using the changeset viewer.