ReactOS  0.4.15-dev-2703-g05fb0f1
newdev.h
Go to the documentation of this file.
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
45  LPCSTR HardwareId,
46  LPCSTR FullInfPath,
47  DWORD InstallFlags,
48  PBOOL bRebootRequired OPTIONAL);
49 
50 BOOL
51 WINAPI
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
95  PSP_DRVINFO_DATA DriverInfoData OPTIONAL,
96  DWORD Flags,
98 
99 BOOL
100 WINAPI
105  DWORD Flags,
107 
108 BOOL
109 WINAPI
114  DWORD Flags,
116 
117 BOOL
118 WINAPI
121  LPCWSTR InfPath,
122  DWORD Flags,
124 
125 BOOL
126 WINAPI
129  LPCSTR InfPath,
130  DWORD Flags,
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
149  DWORD Flags,
151 #endif /* (WINVER >= _WIN32_WINNT_WIN7) */
152 
153 #include <poppack.h>
154 
155 #ifdef __cplusplus
156 }
157 #endif
BOOL WINAPI NeedReboot(DWORD dwRebootCheck)
Definition: advpack.c:311
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI DiRollbackDriver(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, HWND hwndParent OPTIONAL, DWORD Flags, PBOOL NeedReboot OPTIONAL)
BOOL WINAPI UpdateDriverForPlugAndPlayDevicesW(HWND hwndParent, LPCWSTR HardwareId, LPCWSTR FullInfPath, DWORD InstallFlags, PBOOL bRebootRequired OPTIONAL)
unsigned int BOOL
Definition: ntddk_ex.h:94
static HWND hwndParent
Definition: cryptui.c:300
const char * LPCSTR
Definition: xmlstorage.h:183
BOOL WINAPI DiShowUpdateDevice(HWND hwndParent OPTIONAL, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Flags, PBOOL NeedReboot OPTIONAL)
BOOL * PBOOL
Definition: windef.h:161
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
BOOL WINAPI DiInstallDriverA(HWND hwndParent OPTIONAL, LPCSTR InfPath, DWORD Flags, PBOOL NeedReboot OPTIONAL)
#define WINAPI
Definition: msvc.h:6
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI DiInstallDriverW(HWND hwndParent OPTIONAL, LPCWSTR InfPath, DWORD Flags, PBOOL NeedReboot OPTIONAL)
BOOL WINAPI DiInstallDevice(HWND hwndParent OPTIONAL, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PSP_DRVINFO_DATA DriverInfoData OPTIONAL, DWORD Flags, PBOOL NeedReboot OPTIONAL)
BOOL WINAPI UpdateDriverForPlugAndPlayDevicesA(HWND hwndParent, LPCSTR HardwareId, LPCSTR FullInfPath, DWORD InstallFlags, PBOOL bRebootRequired OPTIONAL)
BOOL WINAPI DiUninstallDevice(HWND hwndParent, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Flags, PBOOL NeedReboot OPTIONAL)
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68