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.

117 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. control.h
  5. Abstract:
  6. This is a local header file for control.c
  7. Author:
  8. Paul McDaniel (paulmcd) 23-Jan-2000
  9. Revision History:
  10. --*/
  11. #ifndef _CONTROL_H_
  12. #define _CONTROL_H_
  13. #define SR_CONTROL_OBJECT_CONTEXT ULongToPtr(SR_CONTROL_OBJECT_TAG)
  14. #define IS_VALID_CONTROL_OBJECT(pObject) \
  15. (((pObject) != NULL) && ((pObject)->RefCount > 0) && ((pObject)->Signature == SR_CONTROL_OBJECT_TAG))
  16. //
  17. // locked by global->ControlResource
  18. //
  19. typedef struct _SR_CONTROL_OBJECT
  20. {
  21. //
  22. // NonPagedPool
  23. //
  24. //
  25. // SR_CONTROL_OBJECT_TAG
  26. //
  27. ULONG Signature;
  28. //
  29. // a zero-based reference count
  30. //
  31. LONG RefCount;
  32. //
  33. // the Options passed into SrCreateMonitor
  34. //
  35. ULONG Options;
  36. //
  37. // Irps that have not been completed yet are placed on IrpListHead
  38. //
  39. LIST_ENTRY IrpListHead;
  40. //
  41. // Notify Records that have not been completed to irps are placed on
  42. // NotifyRecordListHead
  43. //
  44. LIST_ENTRY NotifyRecordListHead;
  45. //
  46. // The process that created this control object
  47. //
  48. PEPROCESS pProcess;
  49. } SR_CONTROL_OBJECT, *PSR_CONTROL_OBJECT;
  50. NTSTATUS
  51. SrCreateControlObject (
  52. OUT PSR_CONTROL_OBJECT * ppControlObject,
  53. IN ULONG Options
  54. );
  55. NTSTATUS
  56. SrDeleteControlObject (
  57. IN PSR_CONTROL_OBJECT pControlObject
  58. );
  59. NTSTATUS
  60. SrCancelControlIo (
  61. IN PSR_CONTROL_OBJECT pControlObject
  62. );
  63. VOID
  64. SrReferenceControlObject (
  65. IN PSR_CONTROL_OBJECT pControlObject
  66. );
  67. VOID
  68. SrDereferenceControlObject (
  69. IN PSR_CONTROL_OBJECT pControlObject
  70. );
  71. #endif // _CONTROL_H_