Ignore:
Timestamp:
Dec 14, 2001, 11:41:33 PM (24 years ago)
Author:
umoeller
Message:

Lots of changes for icons and refresh.

File:
1 edited

Legend:

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

    r121 r123  
    5757    PVOID doshMalloc(ULONG cb,
    5858                     APIRET *parc);
     59
     60    APIRET doshAllocArray(ULONG c,
     61                          ULONG cbArrayItem,
     62                          PBYTE *ppv,
     63                          PULONG pcbAllocated);
    5964
    6065    PVOID doshAllocSharedMem(ULONG ulSize,
     
    353358                      LONG lOffset,
    354359                      ULONG ulMethod,
    355                       ULONG cb,
     360                      PULONG pcb,
    356361                      PBYTE pbData);
    357362
     
    464469     ********************************************************************/
    465470
     471    #pragma pack(1)
     472
    466473    /*
    467474     *@@ DOSEXEHEADER:
     
    473480     */
    474481
    475     #pragma pack(1)
    476482    typedef struct _DOSEXEHEADER
    477483    {
     
    532538        ULONG     ulChecksum;           // 08: MS: reserved, OS/2: checksum
    533539        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                           */
    534558        USHORT    usAutoDataSegNo;      // 0e: auto-data seg no.
    535559        USHORT    usInitlHeapSize;      // 10: initl. heap size
     
    581605        ULONG     ulModuleVersion;      // 0c: module version
    582606        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                          */
    583619        ULONG     ulPageCount;          // 14: no. of pages in module
    584620        ULONG     ulEIPRelObj;          // 18: object to which EIP is relative
     
    680716    } PEHEADER, *PPEHEADER;
    681717
     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
    682782    #pragma pack()
    683 
    684     /*
    685      *@@ FSYSMODULE:
    686      *
    687      *@@added V0.9.9 (2001-03-11) [lafaix]
    688      */
    689 
    690     typedef struct _FSYSMODULE
    691     {
    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 _FSYSFUNCTION
    702     {
    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 _FSYSRESOURCE
    715     {
    716         ULONG ulID;                     // resource ID
    717         ULONG ulType;                   // resource type
    718         ULONG ulSize;                   // resource size in bytes
    719         ULONG ulFlag;                   // resource flags
    720     } FSYSRESOURCE, *PFSYSRESOURCE;
    721783
    722784    // object/segment flags (in NE and LX)
     
    822884                // module info substring (if IBM BLDLEVEL format)
    823885
     886#ifndef __STRIP_DOWN_EXECUTABLE__       // for mini stubs in warpin, to reduce code size
    824887        // if pszInfo is extended DESCRIPTION field, the following
    825888        // are set as well:
     
    833896                            pszFixpak;
    834897
     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
    835905    } EXECUTABLE, *PEXECUTABLE;
    836906
     
    838908                        PEXECUTABLE* ppExec);
    839909
    840     APIRET doshExecClose(PEXECUTABLE pExec);
    841 
    842910    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;
    843922
    844923    APIRET doshExecQueryImportedModules(PEXECUTABLE pExec,
     
    848927    APIRET doshExecFreeImportedModules(PFSYSMODULE paModules);
    849928
     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
    850942    APIRET doshExecQueryExportedFunctions(PEXECUTABLE pExec,
    851943                                          PFSYSFUNCTION *ppaFunctions,
     
    854946    APIRET doshExecFreeExportedFunctions(PFSYSFUNCTION paFunctions);
    855947
     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
    856963    APIRET doshExecQueryResources(PEXECUTABLE pExec,
    857964                                  PFSYSRESOURCE *ppaResources,
     
    859966
    860967    APIRET doshExecFreeResources(PFSYSRESOURCE paResources);
     968
     969    APIRET doshLoadLXMaps(PEXECUTABLE pExec);
     970
     971    VOID doshFreeLXMaps(PEXECUTABLE pExec);
     972
     973    APIRET doshExecClose(PEXECUTABLE *ppExec);
    861974
    862975    APIRET doshSearchPath(PCSZ pcszPath,
Note: See TracChangeset for help on using the changeset viewer.