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.

80 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. usb8023.c
  5. Author:
  6. ervinp
  7. Environment:
  8. Kernel mode
  9. Revision History:
  10. --*/
  11. #include <WDM.H>
  12. #include "usb8023.h"
  13. #include "debug.h"
  14. #ifdef ALLOC_PRAGMA
  15. #pragma alloc_text(INIT, DriverEntry)
  16. #endif
  17. NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
  18. /*++
  19. Routine Description:
  20. Installable driver initialization entry point.
  21. This entry point is called directly by the I/O system.
  22. Arguments:
  23. DriverObject - pointer to the driver object
  24. RegistryPath - pointer to a unicode string representing the path,
  25. to driver-specific key in the registry.
  26. Return Value:
  27. STATUS_SUCCESS if successful,
  28. STATUS_UNSUCCESSFUL otherwise
  29. --*/
  30. {
  31. BOOLEAN registered;
  32. PAGED_CODE();
  33. DBGVERBOSE(("DriverEntry"));
  34. KeInitializeSpinLock(&globalSpinLock);
  35. InitializeListHead(&allAdaptersList);
  36. INITDEBUG();
  37. /*
  38. * Kernel drivers register themselves as the handler for
  39. * AddDevice, UnloadDriver, and IRPs at this point.
  40. * But instead, we'll register with RNDIS, so NDIS becomes the owner of all
  41. * PDOs for which this driver is loaded.
  42. */
  43. registered = RegisterRNDISMicroport(DriverObject, RegistryPath);
  44. ASSERT(registered);
  45. return (registered) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
  46. }