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.

131 lines
2.8 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: shi.h
  4. //
  5. // Description: Shingle 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. #define MAX_SYSAUDIO_DEFAULT_TYPE (KSPROPERTY_SYSAUDIO_MIXER_DEFAULT+1)
  29. //---------------------------------------------------------------------------
  30. // Class
  31. //---------------------------------------------------------------------------
  32. typedef class CShingleInstance : public CObj
  33. {
  34. public:
  35. CShingleInstance(
  36. ULONG ulFlags = 0,
  37. PCWSTR pcwstrRegistryPath = NULL,
  38. PCWSTR pcwstrRegistryValue = NULL
  39. );
  40. ~CShingleInstance();
  41. static NTSTATUS
  42. InitializeShingle(
  43. );
  44. static VOID
  45. UninitializeShingle(
  46. );
  47. static NTSTATUS
  48. InitializeShingleWorker(
  49. PVOID pReference1,
  50. PVOID pReference2
  51. );
  52. NTSTATUS
  53. Create(
  54. IN PDEVICE_NODE pDeviceNode,
  55. IN LPGUID pguidClass
  56. );
  57. NTSTATUS
  58. SetDeviceNode(
  59. IN PDEVICE_NODE pDeviceNode
  60. );
  61. PDEVICE_NODE
  62. GetDeviceNode(
  63. )
  64. {
  65. return(pDeviceNode);
  66. };
  67. #ifdef DEBUG
  68. ENUMFUNC
  69. Dump(
  70. );
  71. #endif
  72. private:
  73. NTSTATUS
  74. CreateCreateItem(
  75. IN PCWSTR pcwstrReference
  76. );
  77. ENUMFUNC
  78. DestroyCreateItem(
  79. IN PKSOBJECT_CREATE_ITEM pCreateItem
  80. );
  81. NTSTATUS
  82. CreateDeviceInterface(
  83. IN LPGUID pguidClass,
  84. IN PCWSTR pcwstrReference
  85. );
  86. NTSTATUS
  87. EnableDeviceInterface(
  88. );
  89. VOID
  90. DisableDeviceInterface(
  91. );
  92. VOID
  93. DestroyDeviceInterface(
  94. );
  95. ListDataAssertLess<KSOBJECT_CREATE_ITEM> lstCreateItem;
  96. UNICODE_STRING ustrSymbolicLinkName;
  97. WCHAR wstrReference[10];
  98. PDEVICE_NODE pDeviceNode;
  99. public:
  100. ULONG ulFlags;
  101. PCWSTR pcwstrRegistryPath;
  102. PCWSTR pcwstrRegistryValue;
  103. DefineSignature(0x20494853); // SHI
  104. } SHINGLE_INSTANCE, *PSHINGLE_INSTANCE;
  105. //---------------------------------------------------------------------------
  106. // Globals
  107. //---------------------------------------------------------------------------
  108. extern PSHINGLE_INSTANCE apShingleInstance[];
  109. //---------------------------------------------------------------------------