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.

180 lines
4.8 KiB

  1. /** SVC Defines
  2. *
  3. * Revision history:
  4. *
  5. * sudeepb 27-Feb-1991 Created
  6. */
  7. /* VHE - Virtual Hard Error packet.
  8. *
  9. * DEM makes fbInt24 to true if an hard error happens.
  10. */
  11. typedef struct vhe_s {
  12. char vhe_fbInt24; // Was there a hard error?
  13. char vhe_HrdErrCode; // If hard error then this is the error code
  14. char vhe_bDriveNum; // If so on which drive
  15. } VHE;
  16. typedef VHE *PVHE;
  17. /* DEMEXTERR - Extended Error structure. The following structure contains the
  18. * DOS extended error elements which are loosely coupled in the DOS data
  19. * segment
  20. *
  21. */
  22. /* XLATOFF */
  23. #include <packon.h>
  24. typedef struct _DEMEXTERR {
  25. UCHAR ExtendedErrorLocus;
  26. USHORT ExtendedError;
  27. UCHAR ExtendedErrorAction;
  28. UCHAR ExtendedErrorClass;
  29. PUCHAR ExtendedErrorPointer;
  30. } DEMEXTERR;
  31. typedef DEMEXTERR* PDEMEXTERR;
  32. /* SYSDEV - Device chain node
  33. */
  34. typedef struct _SYSDEV {
  35. ULONG sdevNext; // REAL mode pointer to next device. -1 for end of chain.
  36. char sdevIgnore[6];
  37. UCHAR sdevDevName[8]; // device name
  38. } SYSDEV;
  39. typedef SYSDEV UNALIGNED *PSYSDEV;
  40. #ifndef _DEMINCLUDED_
  41. extern DECLSPEC_IMPORT PSYSDEV pDeviceChain;
  42. #else
  43. extern PSYSDEV pDeviceChain;
  44. #endif
  45. /* XLATON */
  46. /* XLATOFF */
  47. #include <packoff.h>
  48. /* XLATON */
  49. /* Note : To add a new SVC:
  50. * New SVC gets the current value of SVC_LASTSVC. Increment
  51. * the SVC_LASTSVC value. Add the appropriate SVC handler
  52. * in apfnSVC (file dem\demdisp.c) at the end.
  53. * To delete a SVC :
  54. * Move each SVC one level up. Appropriatly adjust the
  55. * apfnSVC (file dem\demdisp.c).
  56. */
  57. /* SVC - Supervisory Call macro.
  58. *
  59. * This macro is used by NTDOS and NTBIO to call DEM.
  60. *
  61. */
  62. #define NTVDMDBG 1
  63. /* ASM
  64. include bop.inc
  65. svc macro func
  66. BOP BOP_DOS
  67. db func
  68. endm
  69. */
  70. #define SVC_DEMCHGFILEPTR 0x00
  71. #define SVC_DEMCHMOD 0x01
  72. #define SVC_DEMCLOSE 0x02
  73. #define SVC_DEMCREATE 0x03
  74. #define SVC_DEMCREATEDIR 0x04
  75. #define SVC_DEMDELETE 0x05
  76. #define SVC_DEMDELETEDIR 0x06
  77. #define SVC_DEMDELETEFCB 0x07
  78. #define SVC_DEMFILETIMES 0x08
  79. #define SVC_DEMFINDFIRST 0x09
  80. #define SVC_DEMFINDFIRSTFCB 0x0a
  81. #define SVC_DEMFINDNEXT 0x0b
  82. #define SVC_DEMFINDNEXTFCB 0x0c
  83. #define SVC_DEMGETBOOTDRIVE 0x0d
  84. #define SVC_DEMGETDRIVEFREESPACE 0x0e
  85. #define SVC_DEMGETDRIVES 0x0f
  86. #define SVC_DEMGSETMEDIAID 0x10
  87. #define SVC_DEMLOADDOS 0x11
  88. #define SVC_DEMOPEN 0x12
  89. #define SVC_DEMQUERYCURRENTDIR 0x13
  90. #define SVC_DEMQUERYDATE 0x14
  91. #define SVC_DEMQUERYTIME 0x15
  92. #define SVC_DEMREAD 0x16
  93. #define SVC_DEMRENAME 0x17
  94. #define SVC_DEMSETCURRENTDIR 0x18
  95. #define SVC_DEMSETDATE 0x19
  96. #define SVC_DEMSETDEFAULTDRIVE 0x1a
  97. #define SVC_DEMSETDTALOCATION 0x1b
  98. #define SVC_DEMSETTIME 0x1c
  99. #define SVC_DEMSETV86KERNELADDR 0x1d
  100. #define SVC_DEMWRITE 0x1e
  101. #define SVC_GETDRIVEINFO 0x1f
  102. #define SVC_DEMRENAMEFCB 0x20
  103. #define SVC_DEMIOCTL 0x21
  104. #define SVC_DEMCREATENEW 0x22
  105. #define SVC_DEMDISKRESET 0x23
  106. #define SVC_DEMSETDPB 0x24
  107. #define SVC_DEMGETDPB 0x25
  108. #define SVC_DEMSLEAZEFUNC 0x26
  109. #define SVC_DEMCOMMIT 0x27
  110. #define SVC_DEMEXTHANDLE 0x28
  111. #define SVC_DEMABSDRD 0x29
  112. #define SVC_DEMABSDWRT 0x2a
  113. #define SVC_DEMGSETCDPG 0x2b
  114. #define SVC_DEMCREATEFCB 0x2c
  115. #define SVC_DEMOPENFCB 0x2d
  116. #define SVC_DEMCLOSEFCB 0x2e
  117. #define SVC_DEMFCBIO 0x2f
  118. #define SVC_DEMDATE16 0x30
  119. #define SVC_DEMGETFILEINFO 0x31
  120. #define SVC_DEMSETHARDERRORINFO 0x32
  121. #define SVC_DEMRETRY 0x33
  122. #define SVC_DEMLOADDOSAPPSYM 0x34
  123. #define SVC_DEMFREEDOSAPPSYM 0x35
  124. #define SVC_DEMENTRYDOSAPP 0x36
  125. #define SVC_DEMDOSDISPCALL 0x37
  126. #define SVC_DEMDOSDISPRET 0x38
  127. #define SVC_OUTPUT_STRING 0x39
  128. #define SVC_INPUT_STRING 0x3A
  129. #define SVC_ISDEBUG 0x3B
  130. #define SVC_PDBTERMINATE 0x3C
  131. #define SVC_DEMEXITVDM 0x3D
  132. #define SVC_DEMWOWFILES 0x3E
  133. #define SVC_DEMLOCKOPER 0x3F
  134. #define SVC_DEMDRIVEFROMHANDLE 0x40
  135. #define SVC_DEMGETCOMPUTERNAME 0x41
  136. #define SVC_DEMFASTREAD 0x42
  137. #define SVC_DEMFASTWRITE 0x43
  138. #define SVC_DEMCHECKPATH 0x44
  139. #define SVC_DEMSYSTEMSYMBOLOP 0x45
  140. #define SVC_DEMGETDPBLIST 0x46
  141. #define SVC_DEMPIPEFILEDATAEOF 0x47
  142. #define SVC_DEMPIPEFILEEOF 0x48
  143. #define SVC_DEMLFNENTRY 0x49
  144. #define SVC_SETDOSVARLOCATION 0x4A
  145. #define SVC_DEMLASTSVC 0x4B
  146. /*
  147. * Equates used in the DEMxxxSYSTEMxxx calls
  148. */
  149. #define SYMOP_LOAD 1
  150. #define SYMOP_FREE 2
  151. #define SYMOP_MOVE 3
  152. #define SYMOP_CLEANUP 0x80
  153. #define ID_NTIO 1
  154. #define ID_NTDOS 2
  155.