Leaked source code of windows server 2003
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.

73 lines
1.7 KiB

  1. #define VDM_APP_MODE 0x00000001L
  2. #define VDM_INTERRUPT_PENDING 0x00000002L
  3. #define VDM_STATE_CHANGE 0x00000004L
  4. #define VDM_VIRTUAL_INTERRUPTS 0x00000200L
  5. #define VDM_PE_MASK 0x80000000L
  6. typedef enum _VdmEventClass {
  7. VdmIO,
  8. VdmStringIO,
  9. VdmMemAccess,
  10. VdmIntAck,
  11. VdmBop,
  12. VdmError,
  13. VdmIrq13
  14. } VDMEVENTCLASS, *PVDMEVENTCLASS;
  15. typedef struct _VdmIoInfo {
  16. USHORT PortNumber;
  17. USHORT Size;
  18. BOOLEAN Read;
  19. } VDMIOINFO, *PVDMIOINFO;
  20. typedef struct _VdmStringIoInfo {
  21. USHORT PortNumber;
  22. USHORT Size;
  23. BOOLEAN Read;
  24. ULONG Count;
  25. ULONG Address;
  26. } VDMSTRINGIOINFO, *PVDMSTRINGIOINFO;
  27. typedef ULONG VDMBOPINFO;
  28. typedef NTSTATUS VDMERRORINFO;
  29. typedef struct _VdmEventInfo {
  30. ULONG Size;
  31. VDMEVENTCLASS Event;
  32. ULONG InstructionSize;
  33. union {
  34. VDMIOINFO IoInfo;
  35. VDMSTRINGIOINFO StringIoInfo;
  36. VDMBOPINFO BopNumber;
  37. VDMERRORINFO ErrorStatus;
  38. };
  39. } VDMEVENTINFO, *PVDMEVENTINFO;
  40. typedef struct _Vdm_InterruptHandler {
  41. USHORT CsSelector;
  42. ULONG Eip;
  43. USHORT SsSelector;
  44. ULONG Esp;
  45. } VDM_INTERRUPTHANDLER, *PVDM_INTERRUPTHANDLER;
  46. typedef struct _Vdm_Tib {
  47. ULONG Size;
  48. ULONG Flags;
  49. VDM_INTERRUPTHANDLER VdmInterruptHandlers[255];
  50. CONTEXT MonitorContext;
  51. CONTEXT VdmContext;
  52. VDMEVENTINFO EventInfo;
  53. } VDM_TIB, *PVDM_TIB;
  54. NTSTATUS
  55. NtStartVdmExecution(
  56. );
  57. // Flags that don't belong here
  58. #define SEL_TYPE_READ 0x00000001
  59. #define SEL_TYPE_WRITE 0x00000002
  60. #define SEL_TYPE_EXECUTE 0x00000004
  61. #define SEL_TYPE_BIG 0x00000008
  62. #define SEL_TYPE_ED 0x00000010
  63. #define SEL_TYPE_2GIG 0x00000020