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.

135 lines
3.1 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: pins.h
  4. //
  5. // Description: KS Pin Instance
  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 CPinInstance : public CInstance
  32. {
  33. public:
  34. CPinInstance(
  35. IN PPARENT_INSTANCE pParentInstance
  36. );
  37. ~CPinInstance(
  38. );
  39. static NTSTATUS
  40. PinDispatchCreate(
  41. IN PDEVICE_OBJECT pdo,
  42. IN PIRP pIrp
  43. );
  44. static NTSTATUS
  45. PinDispatchCreateKP(
  46. IN OUT PPIN_INSTANCE pPinInstance,
  47. IN PKSPIN_CONNECT pPinConnect
  48. );
  49. static NTSTATUS
  50. PinDispatchClose(
  51. IN PDEVICE_OBJECT pdo,
  52. IN PIRP pIrp
  53. );
  54. static NTSTATUS
  55. PinDispatchIoControl(
  56. IN PDEVICE_OBJECT pdo,
  57. IN PIRP pIrp
  58. );
  59. static NTSTATUS
  60. PinStateHandler(
  61. IN PIRP pIrp,
  62. IN PKSPROPERTY pProperty,
  63. IN OUT PKSSTATE pState
  64. );
  65. NTSTATUS
  66. GetStartNodeInstance(
  67. OUT PSTART_NODE_INSTANCE *ppStartNodeInstance
  68. );
  69. #ifdef DEBUG
  70. ENUMFUNC
  71. Dump(
  72. );
  73. ENUMFUNC
  74. DumpAddress(
  75. );
  76. #endif
  77. PARENT_INSTANCE ParentInstance;
  78. PFILTER_INSTANCE pFilterInstance;
  79. PSTART_NODE_INSTANCE pStartNodeInstance;
  80. ULONG ulVolumeNodeNumber;
  81. ULONG PinId;
  82. DefineSignature(0x494E4950); // PINI
  83. } PIN_INSTANCE, *PPIN_INSTANCE;
  84. //---------------------------------------------------------------------------
  85. // Inlines
  86. //---------------------------------------------------------------------------
  87. inline PPIN_INSTANCE
  88. CInstance::GetParentInstance(
  89. )
  90. {
  91. return(CONTAINING_RECORD(
  92. pParentInstance,
  93. PIN_INSTANCE,
  94. ParentInstance));
  95. }
  96. //---------------------------------------------------------------------------
  97. // Local prototypes
  98. //---------------------------------------------------------------------------
  99. NTSTATUS
  100. ForwardIrpNode(
  101. IN PIRP pIrp,
  102. IN OPTIONAL PKSPROPERTY pProperty, // already validated or NULL
  103. IN PFILTER_INSTANCE pFilterInstance,
  104. IN OPTIONAL PPIN_INSTANCE pPinInstance
  105. );
  106. NTSTATUS
  107. GetRelatedStartNodeInstance(
  108. IN PIRP pIrp,
  109. OUT PSTART_NODE_INSTANCE *ppStartNodeInstance
  110. );
  111. NTSTATUS
  112. GetStartNodeInstance(
  113. IN PIRP pIrp,
  114. OUT PSTART_NODE_INSTANCE *ppStartNodeInstance
  115. );
  116. //---------------------------------------------------------------------------