Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
4.4 KiB

  1. /*++ BUILD Version: 0001
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * TDB.H
  8. * 16-bit Kernel Task Data Block
  9. *
  10. * History:
  11. * Created 11-Feb-1992 by Matt Felton (mattfe) - from 16 bit tdb.inc
  12. * 7-apr-1992 mattfe updated to be win 3.1 compatible
  13. *
  14. --*/
  15. /*
  16. * NewExeHdr struct offsets. WOW32 uses these for getting expected winversion
  17. * directly from the exehdr.
  18. *
  19. */
  20. #define NE_LOWINVER_OFFSET 0x3e
  21. #define NE_HIWINVER_OFFSET 0x0c
  22. #define FLAG_NE_PROPFONT 0x2000
  23. /*
  24. * Task Data Block - 16 Bit Kernel Data Structure
  25. *
  26. * Contains all 16 bit task specific data.
  27. *
  28. */
  29. #define numTaskInts 7
  30. #define THUNKELEM 8 // (62*8) = 512-16 (low arena overhead)
  31. #define THUNKSIZE 8
  32. /* XLATOFF */
  33. #pragma pack(2)
  34. /* XLATON */
  35. typedef struct TDB { /* tdb16 */
  36. WORD TDB_next ; // next task in dispatch queue
  37. WORD TDB_taskSP ; // Saved SS:SP for this task
  38. WORD TDB_taskSS ; //
  39. WORD TDB_nEvents ; // Task event counter
  40. BYTE TDB_priority ; // Task priority (0 is highest)
  41. BYTE TDB_thread_ordinal ; // ordinal number of this thread
  42. WORD TDB_thread_next ; // next thread
  43. WORD TDB_thread_tdb ; // the real TDB for this task
  44. WORD TDB_thread_list ; // list of allocated thread structures
  45. WORD TDB_thread_free ; // free list of availble thread structures
  46. WORD TDB_thread_count ; // total count of tread structures
  47. WORD TDB_FCW ; // Floating point control word
  48. BYTE TDB_flags ; // Task flags
  49. BYTE TDB_filler ; // keep word aligned
  50. WORD TDB_ErrMode ; // Error mode for this task
  51. WORD TDB_ExpWinVer ; // Expected Windows version for this task
  52. WORD TDB_Module ; // Task module handle to free in killtask
  53. WORD TDB_pModule ; // Pointer to the module database.
  54. WORD TDB_Queue ; // Task Event Queue pointer
  55. WORD TDB_Parent ; // TDB of the task that started this up
  56. WORD TDB_SigAction ; // Action for app task signal
  57. DWORD TDB_ASignalProc ; // App's Task Signal procedure address
  58. DWORD TDB_USignalProc ; // User's Task Signal procedure address
  59. DWORD TDB_GNotifyProc ; // Task global discard notify proc.
  60. DWORD TDB_INTVECS[numTaskInts] ; // Task specfic harare interrupts
  61. WORD TDB_CompatFlags ; // Compatibility flags
  62. WORD TDB_CompatFlags2 ; // Upper 16 bits
  63. WORD TDB_CompatHandle ; // for dBase bug
  64. WORD TDB_WOWCompatFlagsEx ; // More WOW Compatibility flags
  65. WORD TDB_WOWCompatFlagsEx2 ; // Upper 16 bits
  66. BYTE TDB_Free[3] ; // Filler to keep TDB size unchanged
  67. BYTE TDB_cLibrary ; // tracks add/del of ALL libs in system EMS
  68. DWORD TDB_PHT ; // (HANDLE:OFFSET) to private handle table
  69. WORD TDB_PDB ; // MSDOS Process Data Block (PDB)
  70. DWORD TDB_DTA ; // MSDOS Disk Transfer Address
  71. BYTE TDB_Drive ; // MSDOS current drive
  72. BYTE TDB_Directory[65] ; // *** not used starting with win95
  73. WORD TDB_Validity ; // initial AX to be passed to a task
  74. WORD TDB_Yield_to ; // DirectedYield arg stored here
  75. WORD TDB_LibInitSeg ; // segment address of libraries to init
  76. WORD TDB_LibInitOff ; // MakeProcInstance thunks live here.
  77. WORD TDB_MPI_Sel ; // Code selector for thunks
  78. WORD TDB_MPI_Thunks[((THUNKELEM*THUNKSIZE)/2)]; //
  79. BYTE TDB_ModName[8] ; // Name of Module.
  80. WORD TDB_sig ; // Signature word to detect bogus code
  81. DWORD TDB_ThreadID ; // 32-Bit Thread ID for this Task (use TDB_Filler Above)
  82. DWORD TDB_hThread ; // 32-bit Thread Handle for this task
  83. WORD TDB_WOWCompatFlags; // WOW Compatibility flags
  84. WORD TDB_WOWCompatFlags2; // WOW Compatibility flags
  85. #ifdef FE_SB
  86. WORD TDB_WOWCompatFlagsJPN; // WOW Compatibility flags for JAPAN
  87. WORD TDB_WOWCompatFlagsJPN2; // WOW Compatibility flags for JAPAN
  88. #endif // FE_SB
  89. DWORD TDB_vpfnAbortProc; // printer AbortProc
  90. BYTE TDB_LFNDirectory[260]; // Long directory name
  91. } TDB;
  92. typedef TDB UNALIGNED *PTDB;
  93. // This bit is defined for the TDB_Drive field
  94. #define TDB_DIR_VALID 0x80
  95. #define TDB_SIGNATURE 0x4454
  96. #define TDBF_OS2APP 0x8
  97. #define TDBF_WINOLDAP 0x1
  98. // NOTE TDB_ThreadID MUST be DWORD aligned or else it will fail on MIPS
  99. /* XLATOFF */
  100. #pragma pack()
  101. /* XLATON */