usbrpmif.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * usbrpmif.h
  3. *
  4. * This file is part of the ReactOS PSDK package.
  5. *
  6. * Contributors:
  7. * Created by Amine Khaldi <amine.khaldi@reactos.org>
  8. *
  9. * THIS SOFTWARE IS NOT COPYRIGHTED
  10. *
  11. * This source code is offered for use in the public domain. You may
  12. * use, modify or distribute it freely.
  13. *
  14. * This code is distributed in the hope that it will be useful but
  15. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  16. * DISCLAIMED. This includes but is not limited to warranties of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18. *
  19. */
  20. #pragma once
  21. #include "windef.h"
  22. #include "usb100.h"
  23. #if !defined(_USBRPM_DRIVER_)
  24. #define USBRPMAPI DECLSPEC_IMPORT
  25. #else
  26. #define USBRPMAPI
  27. #endif
  28. typedef struct _USBRPM_DEVICE_INFORMATION {
  29. ULONG64 HubId;
  30. ULONG ConnectionIndex;
  31. UCHAR DeviceClass;
  32. USHORT VendorId;
  33. USHORT ProductId;
  34. WCHAR ManufacturerString[MAXIMUM_USB_STRING_LENGTH];
  35. WCHAR ProductString[MAXIMUM_USB_STRING_LENGTH];
  36. WCHAR HubSymbolicLinkName[MAX_PATH];
  37. } USBRPM_DEVICE_INFORMATION, *PUSBRPM_DEVICE_INFORMATION;
  38. typedef struct _USBRPM_DEVICE_LIST {
  39. ULONG NumberOfDevices;
  40. USBRPM_DEVICE_INFORMATION Device[0];
  41. } USBRPM_DEVICE_LIST, *PUSBRPM_DEVICE_LIST;
  42. USBRPMAPI
  43. NTSTATUS
  44. NTAPI
  45. RPMRegisterAlternateDriver(
  46. PDRIVER_OBJECT DriverObject,
  47. LPCWSTR CompatibleId,
  48. PHANDLE RegisteredDriver);
  49. USBRPMAPI
  50. NTSTATUS
  51. NTAPI
  52. RPMUnregisterAlternateDriver(
  53. HANDLE RegisteredDriver);
  54. USBRPMAPI
  55. NTSTATUS
  56. RPMGetAvailableDevices(
  57. HANDLE RegisteredDriver,
  58. USHORT Locale,
  59. PUSBRPM_DEVICE_LIST *DeviceList);
  60. USBRPMAPI
  61. NTSTATUS
  62. NTAPI
  63. RPMLoadAlternateDriverForDevice(
  64. HANDLE RegisteredDriver,
  65. ULONG64 HubID,
  66. ULONG ConnectionIndex,
  67. REFGUID OwnerGuid);
  68. USBRPMAPI
  69. NTSTATUS
  70. NTAPI
  71. RPMUnloadAlternateDriverForDevice(
  72. HANDLE RegisteredDriver,
  73. ULONG64 HubID,
  74. ULONG ConnectionIndex);