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.

111 lines
2.7 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: fni.h
  4. //
  5. // Description: Filter Node Instance Class
  6. //
  7. //
  8. //@@BEGIN_MSINTERNAL
  9. // Development Team:
  10. // Mike McLaughlin
  11. //
  12. // History: Date Author Comment
  13. //
  14. //@@END_MSINTERNAL
  15. //---------------------------------------------------------------------------
  16. //
  17. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  18. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  19. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  20. // PURPOSE.
  21. //
  22. // Copyright (c) 1996-1999 Microsoft Corporation. All Rights Reserved.
  23. //
  24. //---------------------------------------------------------------------------
  25. //---------------------------------------------------------------------------
  26. // Constants and Macros
  27. //---------------------------------------------------------------------------
  28. //---------------------------------------------------------------------------
  29. // Classes
  30. //---------------------------------------------------------------------------
  31. typedef class CFilterNodeInstance : public CListDoubleItem
  32. {
  33. public:
  34. ~CFilterNodeInstance(
  35. );
  36. static NTSTATUS
  37. Create(
  38. PFILTER_NODE_INSTANCE *ppFilterNodeInstance,
  39. PLOGICAL_FILTER_NODE pLogicalFilterNode,
  40. PDEVICE_NODE pDeviceNode,
  41. BOOL fReuseInstance
  42. );
  43. static NTSTATUS
  44. Create(
  45. PFILTER_NODE_INSTANCE *ppFilterNodeInstance,
  46. PFILTER_NODE pFilterNode
  47. );
  48. VOID
  49. AddRef(
  50. )
  51. {
  52. Assert(this);
  53. ++cReference;
  54. };
  55. ENUMFUNC
  56. Destroy()
  57. {
  58. if(this != NULL) {
  59. Assert(this);
  60. DPF1(95, "CFilterNodeInstance::Destroy: %08x", this);
  61. ASSERT(cReference > 0);
  62. if(--cReference == 0) {
  63. delete this;
  64. }
  65. }
  66. return(STATUS_CONTINUE);
  67. };
  68. NTSTATUS
  69. RegisterTargetDeviceChangeNotification(
  70. );
  71. VOID
  72. UnregisterTargetDeviceChangeNotification(
  73. );
  74. static NTSTATUS
  75. CFilterNodeInstance::DeviceQueryRemove(
  76. );
  77. static NTSTATUS
  78. TargetDeviceChangeNotification(
  79. IN PTARGET_DEVICE_REMOVAL_NOTIFICATION pNotification,
  80. IN PFILTER_NODE_INSTANCE pFilterNodeInstance
  81. );
  82. private:
  83. LONG cReference;
  84. public:
  85. PFILTER_NODE pFilterNode;
  86. PDEVICE_NODE pDeviceNode;
  87. PFILE_OBJECT pFileObject;
  88. HANDLE hFilter;
  89. HANDLE pNotificationHandle;
  90. DefineSignature(0x20494E46); // FNI
  91. } FILTER_NODE_INSTANCE, *PFILTER_NODE_INSTANCE;
  92. //---------------------------------------------------------------------------
  93. typedef ListDoubleDestroy<FILTER_NODE_INSTANCE> LIST_FILTER_NODE_INSTANCE;
  94. //---------------------------------------------------------------------------