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.

77 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. latency.h
  5. Abstract:
  6. The header file containing information needed by both the
  7. user mode and kernel mode of the latency filter driver.
  8. Author:
  9. Molly Brown (mollybro)
  10. Environment:
  11. Kernel mode
  12. --*/
  13. #ifndef __LATENCY_H__
  14. #define __LATENCY_H__
  15. //
  16. // Enable these warnings in the code.
  17. //
  18. #pragma warning(error:4100) // Unreferenced formal parameter
  19. #pragma warning(error:4101) // Unreferenced local variable
  20. #define LATENCY_Reset (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x00, METHOD_BUFFERED, FILE_WRITE_ACCESS )
  21. #define LATENCY_EnableLatency (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x01, METHOD_BUFFERED, FILE_READ_ACCESS )
  22. #define LATENCY_DisableLatency (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x02, METHOD_BUFFERED, FILE_READ_ACCESS )
  23. #define LATENCY_GetLog (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x03, METHOD_BUFFERED, FILE_READ_ACCESS )
  24. #define LATENCY_GetVer (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x04, METHOD_BUFFERED, FILE_READ_ACCESS )
  25. #define LATENCY_ListDevices (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x05, METHOD_BUFFERED, FILE_READ_ACCESS )
  26. #define LATENCY_SetLatency (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x06, METHOD_BUFFERED, FILE_READ_ACCESS )
  27. #define LATENCY_ClearLatency (ULONG) CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x07, METHOD_BUFFERED, FILE_READ_ACCESS )
  28. #define LATENCY_DRIVER_NAME L"LATENCY.SYS"
  29. #define LATENCY_DEVICE_NAME L"LatencyFilter"
  30. #define LATENCY_W32_DEVICE_NAME L"\\\\.\\LatencyFilter"
  31. #define LATENCY_DOSDEVICE_NAME L"\\DosDevices\\LatencyFilter"
  32. #define LATENCY_FULLDEVICE_NAME L"\\Device\\LatencyFilter"
  33. #define LATENCY_MAJ_VERSION 1
  34. #define LATENCY_MIN_VERSION 0
  35. typedef struct _LATENCYVER {
  36. USHORT Major;
  37. USHORT Minor;
  38. } LATENCYVER, *PLATENCYVER;
  39. typedef struct _LATENCY_ENABLE_DISABLE {
  40. UNICODE_STRING DeviceName;
  41. UCHAR DeviceNameBuffer[];
  42. } LATENCY_ENABLE_DISABLE, *PLATENCY_ENABLE_DISABLE;
  43. typedef struct _LATENCY_SET_CLEAR {
  44. UCHAR IrpCode;
  45. ULONG Milliseconds;
  46. UNICODE_STRING DeviceName;
  47. UCHAR DeviceNameBuffer[];
  48. } LATENCY_SET_CLEAR, *PLATENCY_SET_CLEAR;
  49. #define LATENCY_ATTACH_ALL_VOLUMES 1
  50. #define LATENCY_ATTACH_ON_DEMAND 0
  51. #endif /* __LATENCY_H__ */