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.

80 lines
2.2 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. //
  29. // (iomgr.h) DEFAULT_LARGE_IRP_LOCATIONS - 1
  30. //
  31. #define SYSTEM_LARGE_IRP_LOCATIONS 7
  32. //---------------------------------------------------------------------------
  33. // Data Structures
  34. //---------------------------------------------------------------------------
  35. typedef struct device_instance
  36. {
  37. PVOID pDeviceHeader;
  38. PDEVICE_OBJECT pPhysicalDeviceObject;
  39. } DEVICE_INSTANCE, *PDEVICE_INSTANCE;
  40. //---------------------------------------------------------------------------
  41. // Globals
  42. //---------------------------------------------------------------------------
  43. extern PDEVICE_INSTANCE gpDeviceInstance;
  44. //---------------------------------------------------------------------------
  45. // Local prototypes
  46. //---------------------------------------------------------------------------
  47. extern "C" {
  48. NTSTATUS
  49. DriverEntry(
  50. IN PDRIVER_OBJECT DriverObject,
  51. IN PUNICODE_STRING usRegistryPathName
  52. );
  53. NTSTATUS
  54. DispatchPnp(
  55. IN PDEVICE_OBJECT pDeviceObject,
  56. IN PIRP pIrp
  57. );
  58. VOID
  59. DriverUnload(
  60. IN PDRIVER_OBJECT DriverObject
  61. );
  62. NTSTATUS
  63. AddDevice(
  64. IN PDRIVER_OBJECT DriverObject,
  65. IN PDEVICE_OBJECT PhysicalDeviceObject
  66. );
  67. } // extern "C"