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.

115 lines
3.1 KiB

  1. /*++ BUILD Version: 0002
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * DOSWOW.H
  8. * Shared structures between NTDOS, DEM and WOW32
  9. *
  10. * History:
  11. * Created 03-Dec-1993 by Neil Sandlin (neilsa)
  12. --*/
  13. /* XLATOFF */
  14. #pragma pack(2)
  15. /* XLATON */
  16. /*
  17. * The following structure is used by some of the WOW functions to
  18. * point to internal DOS data. This is done to emulate some of the more
  19. * involved functions in WOW32, while still maintaining DOS data integrity.
  20. */
  21. typedef struct _DOSWOWDATA { /* DWD */
  22. DWORD lpCDSCount;
  23. DWORD lpCDSFixedTable;
  24. DWORD lpCDSBuffer;
  25. DWORD lpCurDrv;
  26. DWORD lpCurPDB;
  27. DWORD lpDrvErr;
  28. DWORD lpExterrLocus; // byte
  29. DWORD lpSCS_ToSync;
  30. DWORD lpSftAddr;
  31. DWORD lpExterr; // word
  32. DWORD lpExterrActionClass; // 2 bytes -- action and class
  33. } DOSWOWDATA;
  34. typedef DOSWOWDATA UNALIGNED *PDOSWOWDATA;
  35. /* XLATOFF */
  36. #pragma pack(1)
  37. typedef struct _DOSPDB { // DOS Process Data Block
  38. CHAR PDB_Not_Interested[44]; // Fields we are not interested in
  39. USHORT PDB_environ; // segment of environment
  40. DWORD PDB_User_stack;
  41. USHORT PDB_JFN_Length; // JFT length
  42. ULONG PDB_JFN_Pointer; // JFT pointer
  43. } DOSPDB, *PDOSPDB;
  44. typedef struct _DOSSF { // DOS header for SFT chain
  45. ULONG SFLink; // Link to next SF
  46. USHORT SFCount; // number of entries
  47. USHORT SFTable; // beginning of array of the SFTs
  48. } DOSSF;
  49. typedef DOSSF UNALIGNED *PDOSSF;
  50. #define SFT_NAMED_PIPE 0x2000 // named pipe flag
  51. typedef struct _DOSSFT { // DOS SFT
  52. USHORT SFT_Ref_Count; // Howmany tasks using it
  53. USHORT SFT_Mode; // Mode of access
  54. UCHAR SFT_Attr; // Attribute of file
  55. USHORT SFT_Flags; // Bit 15 = 1 if remote file
  56. // = 0 if local or device
  57. ULONG SFT_Devptr; // Device pointer
  58. USHORT SFT_Time;
  59. USHORT SFT_Date;
  60. ULONG SFT_Size;
  61. ULONG SFT_Position;
  62. ULONG SFT_Chain;
  63. USHORT SFT_PID;
  64. ULONG SFT_NTHandle; // NT File Handle
  65. } DOSSFT;
  66. typedef DOSSFT UNALIGNED *PDOSSFT;
  67. // execblock
  68. typedef struct _DOSEXECBLOCK {
  69. USHORT envseg; // env segment
  70. ULONG lpcmdline; // command line tail
  71. ULONG lpfcb1; // fcb1
  72. ULONG lpfcb2; // fcb2
  73. } DOSEXECBLOCK, UNALIGNED *PDOSEXECBLOCK;
  74. #define NE_FLAGS_OFFSET 0xc
  75. #define NEPROT 0x8 // runs in prot mode only
  76. #define SF_NT_SEEK 0x0200
  77. #pragma pack()
  78. // these are demLFN structures that work with wow and dem
  79. typedef VOID (*PDOSWOWUPDATETDBDIR)(UCHAR, LPSTR);
  80. typedef BOOL (*PDOSWOWGETTDBDIR)(UCHAR Drive, LPSTR pCurrentDirectory);
  81. typedef BOOL (*PDOSWOWDODIRECTHDPOPUP)(VOID);
  82. typedef BOOL (*PDOSWOWGETCOMPATFLAGS)(LPDWORD lpdwCF, LPDWORD lpdwCFEx);
  83. typedef struct tagWOWLFNInit {
  84. PDOSWOWUPDATETDBDIR pDosWowUpdateTDBDir;
  85. PDOSWOWGETTDBDIR pDosWowGetTDBDir;
  86. PDOSWOWDODIRECTHDPOPUP pDosWowDoDirectHDPopup;
  87. #if 0
  88. PDOSWOWGETCOMPATFLAGS pDosWowGetCompatFlags;
  89. #endif
  90. } WOWLFNINIT, *PWOWLFNINIT;
  91. /* XLATON */