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.

79 lines
2.1 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: device.h
  4. //
  5. // Description: Device Initialization code
  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 STR_LINKNAME TEXT("\\DosDevices\\sysaudio")
  29. #define STR_DEVICENAME TEXT("\\Device\\sysaudio")
  30. //---------------------------------------------------------------------------
  31. // Data Structures
  32. //---------------------------------------------------------------------------
  33. typedef struct device_instance
  34. {
  35. PVOID pDeviceHeader;
  36. PDEVICE_OBJECT pPhysicalDeviceObject;
  37. PDEVICE_OBJECT pFunctionalDeviceObject;
  38. } DEVICE_INSTANCE, *PDEVICE_INSTANCE;
  39. //---------------------------------------------------------------------------
  40. // Globals
  41. //---------------------------------------------------------------------------
  42. extern PDEVICE_INSTANCE gpDeviceInstance;
  43. //---------------------------------------------------------------------------
  44. // Local prototypes
  45. //---------------------------------------------------------------------------
  46. extern "C" {
  47. NTSTATUS
  48. DriverEntry(
  49. IN PDRIVER_OBJECT DriverObject,
  50. IN PUNICODE_STRING usRegistryPathName
  51. );
  52. NTSTATUS
  53. DispatchPnp(
  54. IN PDEVICE_OBJECT pDeviceObject,
  55. IN PIRP pIrp
  56. );
  57. VOID
  58. DriverUnload(
  59. IN PDRIVER_OBJECT DriverObject
  60. );
  61. NTSTATUS
  62. AddDevice(
  63. IN PDRIVER_OBJECT DriverObject,
  64. IN PDEVICE_OBJECT PhysicalDeviceObject
  65. );
  66. } // extern "C"