xref: /reactos/sdk/include/psdk/usbrpmif.h (revision 34593d93)
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 
21 #pragma once
22 
23 #include "windef.h"
24 #include "usb100.h"
25 
26 #if !defined(_USBRPM_DRIVER_)
27 #define USBRPMAPI DECLSPEC_IMPORT
28 #else
29 #define USBRPMAPI
30 #endif
31 
32 typedef struct _USBRPM_DEVICE_INFORMATION {
33   ULONG64 HubId;
34   ULONG ConnectionIndex;
35   UCHAR DeviceClass;
36   USHORT VendorId;
37   USHORT ProductId;
38   WCHAR ManufacturerString[MAXIMUM_USB_STRING_LENGTH];
39   WCHAR ProductString[MAXIMUM_USB_STRING_LENGTH];
40   WCHAR HubSymbolicLinkName[MAX_PATH];
41 } USBRPM_DEVICE_INFORMATION, *PUSBRPM_DEVICE_INFORMATION;
42 
43 typedef struct _USBRPM_DEVICE_LIST {
44   ULONG NumberOfDevices;
45   USBRPM_DEVICE_INFORMATION Device[0];
46 } USBRPM_DEVICE_LIST, *PUSBRPM_DEVICE_LIST;
47 
48 USBRPMAPI
49 NTSTATUS
50 NTAPI
51 RPMRegisterAlternateDriver(
52   IN PDRIVER_OBJECT  DriverObject,
53   IN LPCWSTR CompatibleId,
54   OUT PHANDLE RegisteredDriver);
55 
56 USBRPMAPI
57 NTSTATUS
58 NTAPI
59 RPMUnregisterAlternateDriver(
60   IN HANDLE RegisteredDriver);
61 
62 USBRPMAPI
63 NTSTATUS
64 RPMGetAvailableDevices(
65   IN HANDLE RegisteredDriver,
66   IN USHORT Locale,
67   OUT PUSBRPM_DEVICE_LIST *DeviceList);
68 
69 USBRPMAPI
70 NTSTATUS
71 NTAPI
72 RPMLoadAlternateDriverForDevice(
73   IN HANDLE RegisteredDriver,
74   IN ULONG64 HubID,
75   IN ULONG ConnectionIndex,
76   IN OPTIONAL REFGUID OwnerGuid);
77 
78 USBRPMAPI
79 NTSTATUS
80 NTAPI
81 RPMUnloadAlternateDriverForDevice(
82   IN HANDLE RegisteredDriver,
83   IN ULONG64 HubID,
84   IN ULONG ConnectionIndex);
85