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.

160 lines
6.1 KiB

  1. /*****************************************************************************
  2. Copyright (c) 1997-98 Intel Corp.
  3. All Rights Reserved.
  4. The source code contained or described herein and all documents
  5. related to the source code ("Material") are owned by Intel Corporation
  6. or its suppliers and licensors. Title to the Material remains with
  7. Intel Corporation or its suppliers and licensors. The Material
  8. contains trade secrets and proprietary and confidential information of
  9. Intel or its suppliers and licensors. The Material is protected by
  10. worldwide copyright and trade secret laws and treaty provisions. No
  11. part of the Material may be used, copied, reproduced, modified,
  12. published, uploaded, posted, transmitted, distributed, or disclosed in
  13. any way without Intel's prior express written permission.
  14. Unless otherwise expressly permitted by Intel in a separate license
  15. agreement, use of the Material is subject to the copyright notices,
  16. trademarks, warranty, use, and disclosure restrictions reflected on
  17. the outside of the media, in the documents themselves, and in the
  18. "About" or "Read Me" or similar file contained within this source
  19. code, and identified as (name of the file) . Unless otherwise
  20. expressly agreed by Intel in writing, you may not remove or alter such
  21. notices in any way.
  22. File: vxchange.h
  23. Description: Defines the Ioctl API between the Win32 application and
  24. the kernel mode driver
  25. Revision: $Revision:$ // Do not delete or replace
  26. Notes:
  27. Major History:
  28. When Who What
  29. ---------- ---------- ----------
  30. 03/06/98 Jey Created
  31. *****************************************************************************/
  32. #ifndef _VXCHANGE_H_
  33. #define _VXCHANGE_H_
  34. #include <windef.h> // for MAX_PATH
  35. /*-------------------------------------------------------------------------
  36. // VxChange kernel mode device names
  37. //------------------------------------------------------------------------*/
  38. #define VXCHANGE_KERNEL_DEVICE_NAME L"\\Device\\VxChange"
  39. #define VXCHANGE_WIN32DEVICE_NAME L"\\DosDevices\\VxChange"
  40. /*-------------------------------------------------------------------------
  41. // Interface structures and Defines
  42. //------------------------------------------------------------------------*/
  43. /*
  44. // After the device open the following structure is queried from the
  45. // driver to understand the version number of the interface supported.
  46. */
  47. typedef struct tagVxChange_Attrs_t
  48. {
  49. ULONG structSize; /* Size of this structure */
  50. ULONG Version; /* Driver Version */
  51. UCHAR Data[1]; /* more data in the future? */
  52. } VxChange_Attrs_t, *VxChange_Attrs_Ptr_t;
  53. typedef struct tagVxChange_MapMem_t
  54. {
  55. PVOID ProcessVirtualAddress;
  56. ULONG MapLength;
  57. } VxChange_MapMem_t, *VxChange_MapMem_Ptr_t;
  58. /*-------------------------------------------------------------------------
  59. // Ioctl defines
  60. //------------------------------------------------------------------------*/
  61. #define FUNCTION_GET_DRIVER_ATTRIBUTES 3000 /* read request */
  62. #define FUNCTION_CREATE_FILE 3001 /* read/write request */
  63. #define FUNCTION_CLOSE_FILE 3002 /* write request */
  64. #define FUNCTION_READ_FILE 3003 /* buff io read request */
  65. #define FUNCTION_WRITE_FILE 3004 /* buff io write request */
  66. #define FUNCTION_DISABLE_OS_EVENT_NOTIFICATION 3005
  67. #define FUNCTION_ENABLE_OS_EVENT_NOTIFICATION 3006
  68. #define FUNCTION_LOCK_MEMORY 3007
  69. #define FUNCTION_UNLOCK_MEMORY 3008
  70. #define FUNCTION_OPEN_FILE 3009 /* open request - no create */
  71. #define IOCTL_VXCHANGE_GET_DRIVER_ATTRIBUTES \
  72. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  73. FUNCTION_GET_DRIVER_ATTRIBUTES, \
  74. METHOD_BUFFERED, \
  75. FILE_ANY_ACCESS )
  76. /* This IOCTL is used to open an existing file on the host. No create */
  77. #define IOCTL_VXCHANGE_OPEN_FILE \
  78. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  79. FUNCTION_OPEN_FILE, \
  80. METHOD_BUFFERED, \
  81. FILE_ANY_ACCESS )
  82. /* This IOCTL is used to open a file on the host. If the file does not exist,
  83. * it will be created. */
  84. #define IOCTL_VXCHANGE_CREATE_FILE \
  85. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  86. FUNCTION_CREATE_FILE, \
  87. METHOD_BUFFERED, \
  88. FILE_ANY_ACCESS )
  89. #define IOCTL_VXCHANGE_CLOSE_FILE \
  90. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  91. FUNCTION_CLOSE_FILE, \
  92. METHOD_BUFFERED, \
  93. FILE_ANY_ACCESS )
  94. #define IOCTL_VXCHANGE_READ_FILE \
  95. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  96. FUNCTION_READ_FILE, \
  97. METHOD_BUFFERED, \
  98. FILE_READ_ACCESS )
  99. #define IOCTL_VXCHANGE_WRITE_FILE \
  100. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  101. FUNCTION_WRITE_FILE, \
  102. METHOD_BUFFERED, \
  103. FILE_WRITE_ACCESS )
  104. #define IOCTL_VXCHANGE_DISABLE_OS_EVENT_NOTIFICATION \
  105. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  106. FUNCTION_DISABLE_OS_EVENT_NOTIFICATION, \
  107. METHOD_BUFFERED, \
  108. FILE_WRITE_ACCESS )
  109. #define IOCTL_VXCHANGE_ENABLE_OS_EVENT_NOTIFICATION \
  110. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  111. FUNCTION_ENABLE_OS_EVENT_NOTIFICATION, \
  112. METHOD_BUFFERED, \
  113. FILE_WRITE_ACCESS )
  114. #define IOCTL_VXCHANGE_LOCK_MEMORY \
  115. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  116. FUNCTION_LOCK_MEMORY, \
  117. METHOD_BUFFERED, \
  118. FILE_WRITE_ACCESS )
  119. #define IOCTL_VXCHANGE_UNLOCK_MEMORY \
  120. CTL_CODE( FILE_DEVICE_UNKNOWN, \
  121. FUNCTION_UNLOCK_MEMORY, \
  122. METHOD_BUFFERED, \
  123. FILE_WRITE_ACCESS )
  124. #endif // _VXCHANGE_H_