- Temporarily move those headers from PSDK to DDK (due to svn awesomeness).
[reactos.git] / include / ddk / newdev.h
1 /*
2 * newdev.h
3 *
4 * Driver installation DLL interface
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #pragma once
24
25 #include <setupapi.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include <pshpack1.h>
32
33 /* UpdateDriverForPlugAndPlayDevices.InstallFlags constants */
34 #define INSTALLFLAG_FORCE 0x00000001
35 #define INSTALLFLAG_READONLY 0x00000002
36 #define INSTALLFLAG_NONINTERACTIVE 0x00000004
37 #define INSTALLFLAG_BITS 0x00000007
38
39 #if (WINVER >= _WIN32_WINNT_WIN2K)
40
41 BOOL
42 WINAPI
43 UpdateDriverForPlugAndPlayDevicesA(
44 HWND hwndParent,
45 LPCSTR HardwareId,
46 LPCSTR FullInfPath,
47 DWORD InstallFlags,
48 PBOOL bRebootRequired OPTIONAL);
49
50 BOOL
51 WINAPI
52 UpdateDriverForPlugAndPlayDevicesW(
53 HWND hwndParent,
54 LPCWSTR HardwareId,
55 LPCWSTR FullInfPath,
56 DWORD InstallFlags,
57 PBOOL bRebootRequired OPTIONAL);
58
59 #ifdef UNICODE
60 #define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesW
61 #else
62 #define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesA
63 #endif /* UNICODE */
64
65 #endif /* (WINVER >= _WIN32_WINNT_WIN2K) */
66
67 #if (WINVER >= _WIN32_WINNT_VISTA)
68
69 #define DIIDFLAG_SHOWSEARCHUI 0x00000001
70 #define DIIDFLAG_NOFINISHINSTALLUI 0x00000002
71 #define DIIDFLAG_INSTALLNULLDRIVER 0x00000004
72 #define DIIDFLAG_BITS 0x00000007
73
74 #define DIIRFLAG_INF_ALREADY_COPIED 0x00000001
75 #define DIIRFLAG_FORCE_INF 0x00000002
76 #define DIIRFLAG_HW_USING_THE_INF 0x00000004
77 #define DIIRFLAG_HOTPATCH 0x00000008
78 #define DIIRFLAG_NOBACKUP 0x00000010
79 #define DIIRFLAG_BITS ( DIIRFLAG_FORCE_INF | DIIRFLAG_HOTPATCH)
80 #define DIIRFLAG_SYSTEM_BITS ( DIIRFLAG_INF_ALREADY_COPIED |\
81 DIIRFLAG_FORCE_INF |\
82 DIIRFLAG_HW_USING_THE_INF |\
83 DIIRFLAG_HOTPATCH |\
84 DIIRFLAG_NOBACKUP )
85
86 #define ROLLBACK_FLAG_NO_UI 0x00000001
87 #define ROLLBACK_BITS 0x00000001
88
89 BOOL
90 WINAPI
91 DiInstallDevice(
92 HWND hwndParent OPTIONAL,
93 HDEVINFO DeviceInfoSet,
94 PSP_DEVINFO_DATA DeviceInfoData,
95 PSP_DRVINFO_DATA DriverInfoData OPTIONAL,
96 DWORD Flags,
97 PBOOL NeedReboot OPTIONAL);
98
99 BOOL
100 WINAPI
101 DiShowUpdateDevice(
102 HWND hwndParent OPTIONAL,
103 HDEVINFO DeviceInfoSet,
104 PSP_DEVINFO_DATA DeviceInfoData,
105 DWORD Flags,
106 PBOOL NeedReboot OPTIONAL);
107
108 BOOL
109 WINAPI
110 DiRollbackDriver(
111 HDEVINFO DeviceInfoSet,
112 PSP_DEVINFO_DATA DeviceInfoData,
113 HWND hwndParent OPTIONAL,
114 DWORD Flags,
115 PBOOL NeedReboot OPTIONAL);
116
117 BOOL
118 WINAPI
119 DiInstallDriverW(
120 HWND hwndParent OPTIONAL,
121 LPCWSTR InfPath,
122 DWORD Flags,
123 PBOOL NeedReboot OPTIONAL);
124
125 BOOL
126 WINAPI
127 DiInstallDriverA(
128 HWND hwndParent OPTIONAL,
129 LPCSTR InfPath,
130 DWORD Flags,
131 PBOOL NeedReboot OPTIONAL);
132
133
134 #ifdef UNICODE
135 #define DiInstallDriver DiInstallDriverW
136 #else
137 #define DiInstallDriver DiInstallDriverA
138 #endif
139
140 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
141
142 #if (WINVER >= _WIN32_WINNT_WIN7)
143 BOOL
144 WINAPI
145 DiUninstallDevice(
146 HWND hwndParent,
147 HDEVINFO DeviceInfoSet,
148 PSP_DEVINFO_DATA DeviceInfoData,
149 DWORD Flags,
150 PBOOL NeedReboot OPTIONAL);
151 #endif /* (WINVER >= _WIN32_WINNT_WIN7) */
152
153 #include <poppack.h>
154
155 #ifdef __cplusplus
156 }
157 #endif