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.

70 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. viirplog.h
  5. Abstract:
  6. This header defines the internal prototypes and constants required for
  7. managing irp logs. The file is meant to be included by vfirplog.c only.
  8. Author:
  9. Adrian J. Oney (adriao) 20-Feb-2002
  10. --*/
  11. //#define MAX_INSTANCE_COUNT 10
  12. #define IRPLOG_FLAG_FULL 0x00000001
  13. #define IRPLOG_FLAG_NAMELESS 0x00000002
  14. #define IRPLOG_FLAG_DELETED 0x00000004
  15. enum {
  16. DDILOCK_UNREGISTERED,
  17. DDILOCK_REGISTERING,
  18. DDILOCK_REGISTERED
  19. };
  20. typedef struct {
  21. LOGICAL Locked;
  22. LIST_ENTRY ListHead;
  23. } IRPLOG_HEAD, *PIRPLOG_HEAD;
  24. typedef struct {
  25. PDEVICE_OBJECT DeviceObject;
  26. LIST_ENTRY HashLink;
  27. ULONG Flags;
  28. DEVICE_TYPE DeviceType;
  29. ULONG MaximumElementCount;
  30. ULONG Head;
  31. IRPLOG_SNAPSHOT SnapshotArray[1];
  32. } IRPLOG_DATA, *PIRPLOG_DATA;
  33. #define VI_IRPLOG_DATABASE_HASH_SIZE 1
  34. #define VI_IRPLOG_DATABASE_HASH_PRIME 0
  35. #define VI_IRPLOG_CALCULATE_DATABASE_HASH(DeviceObject) \
  36. (((((UINT_PTR) DeviceObject)/(PAGE_SIZE*2))*VI_IRPLOG_DATABASE_HASH_PRIME) % VI_IRPLOG_DATABASE_HASH_SIZE)
  37. PIRPLOG_DATA
  38. FASTCALL
  39. ViIrpLogDatabaseFindPointer(
  40. IN PDEVICE_OBJECT DeviceObject,
  41. OUT PIRPLOG_HEAD *HashHead
  42. );
  43. VOID
  44. ViIrpLogExposeWmiCallback(
  45. IN PVOID Context
  46. );