Module Table Entry for OS/2 Warp V4.0 and OS/2 Warp V3.0

For MTE formats for other versions of OS/2 see:

Pointers

Locations VM Owner

Format

┌─────────────┬──────┬──────┬────┬────────────────────────────────────┐│Field NameOffsetLengthTypeDescription                         │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_flags2   │+0    │2     │W   │Module flags 2                      │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_handle   │+2    │2     │W   │the handle for this mte             │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_swapmte  │+4    │4     │D   │link to swappable mte               │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_link     │+8    │4     │D   │link to next mte                    │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_flags1   │+c    │4     │D   │Module flags 1                      │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_impmodcnt│+10   │4     │D   │Num of entries in Imp Mod Name Tbl  │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_sfn      │+14   │2     │W   │file system number for open file    │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_usecnt   │+16   │2     │W   │.EXE only - use count               │
├─────────────┼──────┼──────┼────┼────────────────────────────────────┤
│mte_modname  │+18   │8     │B   │resident module name (zero extended)│
└─────────────┴──────┴──────┴────┴────────────────────────────────────┘

mte_flags1 flag definitions:

┌───────────────┬──────────┬────────────────────────────────────┐
│Name           │Bit Mask  │Description                         │
├───────────────┼──────────┼────────────────────────────────────┤
│NOAUTODS       │0x00000000│No Auto DS exists                   │
├───────────────┼──────────┼────────────────────────────────────┤
│SOLO           │0x00000001│Auto DS is shared                   │
├───────────────┼──────────┼────────────────────────────────────┤
│INSTANCEDS     │0x00000002│Auto DS is not shared               │
├───────────────┼──────────┼────────────────────────────────────┤
│INSTLIBINIT    │0x00000004│Per-instance Libinit                │
├───────────────┼──────────┼────────────────────────────────────┤
│GINISETUP      │0x00000008│Global Init has been setup          │
├───────────────┼──────────┼────────────────────────────────────┤
│NOINTERNFIXUPS │0x00000010│internal fixups in .EXE-.DLL applied│
├───────────────┼──────────┼────────────────────────────────────┤
│NOEXTERNFIXUPS │0x00000020│external fixups in .EXE-.DLL applied│
├───────────────┼──────────┼────────────────────────────────────┤
│CLASS_PROGRAM  │0x00000040│Program class                       │
├───────────────┼──────────┼────────────────────────────────────┤
│CLASS_GLOBAL   │0x00000080│Global class                        │
├───────────────┼──────────┼────────────────────────────────────┤
│CLASS_SPECIFIC │0x000000C0│Specific class, as against global   │
├───────────────┼──────────┼────────────────────────────────────┤
│CLASS_ALL      │0x00000000│nonspecific class - all modules     │
├───────────────┼──────────┼────────────────────────────────────┤
│CLASS_MASK     │0x000000C0│                                    │
├───────────────┼──────────┼────────────────────────────────────┤
│MTEPROCESSED   │0x00000100│MTE being loaded                    │
├───────────────┼──────────┼────────────────────────────────────┤
│USED           │0x00000200│MTE is referenced - see ldrgc.c     │
├───────────────┼──────────┼────────────────────────────────────┤
│DOSLIB         │0x00000400│set if DOSCALL1                     │
├───────────────┼──────────┼────────────────────────────────────┤
│DOSMOD         │0x00000800│set if DOSCALLS                     │
├───────────────┼──────────┼────────────────────────────────────┤
│MTE_MEDIAFIXED │0x00001000│File Media permits discarding       │
├───────────────┼──────────┼────────────────────────────────────┤
│LDRINVALID     │0x00002000│module not loadable                 │
├───────────────┼──────────┼────────────────────────────────────┤
│PROGRAMMOD     │0x00000000│program module                      │
├───────────────┼──────────┼────────────────────────────────────┤
│DEVDRVMOD      │0x00004000│device driver module                │
├───────────────┼──────────┼────────────────────────────────────┤
│LIBRARYMOD     │0x00008000│DLL module                          │
├───────────────┼──────────┼────────────────────────────────────┤
│VDDMOD         │0x00010000│VDD module                          │
├───────────────┼──────────┼────────────────────────────────────┤
│MVDMMOD        │0x00020000│Set if VDD Helper MTE (MVDM.DLL)    │
├───────────────┼──────────┼────────────────────────────────────┤
│INGRAPH        │0x00040000│In Module Graph - see ldrgc.c       │
├───────────────┼──────────┼────────────────────────────────────┤
│GINIDONE       │0x00080000│Global Init has finished            │
├───────────────┼──────────┼────────────────────────────────────┤
│MTEADDRALLOCED │0x00100000│Allocate specific or not            │
├───────────────┼──────────┼────────────────────────────────────┤
│FSDMOD         │0x00200000│FSD MTE                             │
├───────────────┼──────────┼────────────────────────────────────┤
│FSHMOD         │0x00400000│FS helper MTE                       │
├───────────────┼──────────┼────────────────────────────────────┤
│MTELONGNAMES   │0x00800000│Module supports long-names          │
├───────────────┼──────────┼────────────────────────────────────┤
│MTE_MEDIACONTIG│0x01000000│File Media contiguous memory req    │
├───────────────┼──────────┼────────────────────────────────────┤
│MTE_MEDIA16M   │0x02000000│File Media requires mem below 16M   │
├───────────────┼──────────┼────────────────────────────────────┤
│MTESWAPONLOAD  │0x04000000│make code pages swap on load        │
├───────────────┼──────────┼────────────────────────────────────┤
│MTEPORTHOLE    │0x08000000│porthole module                     │
├───────────────┼──────────┼────────────────────────────────────┤
│MTEMODPROT     │0x10000000│Module has shared memory protected  │
├───────────────┼──────────┼────────────────────────────────────┤
│MTENEWMOD      │0x20000000│Newly added module                  │
├───────────────┼──────────┼────────────────────────────────────┤
│MTEDLLTERM     │0x40000000│Gets instance termination           │
├───────────────┼──────────┼────────────────────────────────────┤
│MTESYMLOADED   │0x80000000│Set if debugger symbols loaded      │
└───────────────┴──────────┴────────────────────────────────────┘

mte_flags2 flag definitions:

┌───────────────┬────────┬────────────────────────────────────────┐
│Name           │Bit Mask│Description                             │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFORMATMASK  │0x0003  │Module format mask                      │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFORMATR1    │0x0000  │Module format reserved                  │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFORMATNE    │0x0001  │Module format NE                        │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFORMATLX    │0x0002  │Module format LX                        │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFORMATR2    │0x0003  │Module format reserved                  │
├───────────────┼────────┼────────────────────────────────────────┤
│MTESYSTEMDLL   │0x0004  │DLL exists in system list               │
├───────────────┼────────┼────────────────────────────────────────┤
│MTELOADORATTACH│0x0008  │Module under load or attach - for init  │
├───────────────┼────────┼────────────────────────────────────────┤
│MTECIRCLEREF   │0x0010  │Module circular reference detection     │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEFREEFIXUPS  │0x0020  │Free system mte's fixup flag d#98488    │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEPRELOADED   │0x0040  │MTE Preload completed                   │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEGETMTEDONE  │0x0080  │GetMTE already resolved                 │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEPACKSEGDONE │0x0100  │Segment packed memory allocated         │
├───────────────┼────────┼────────────────────────────────────────┤
│MTE20LIELIST   │0x0200  │Name present in version20 lie list      │
├───────────────┼────────┼────────────────────────────────────────┤
│MTESYSPROCESSED│0x0400  │System DLL already processed            │
├───────────────┼────────┼────────────────────────────────────────┤
│MTEDLLONEXTLST │0x1000  │DLL has term routine on exit list #74177│
│               │        │removed - 75809                         │
└───────────────┴────────┴────────────────────────────────────────┘


[Back: Loader Control Block Reference]
[Next: Module Table Entry for OS/2 V2.11]