4 * Device management API manifest constants and type definitions.
8 * Written by Anders Norlander <anorland@hem2.passagen.se>
9 * Copyright (C) 1998, 1999, 2002-2004, 2016, MinGW.org Project
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice (including the next
20 * paragraph) shall be included in all copies or substantial portions of the
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
33 #pragma GCC system_header
35 #ifndef __WINUSER_H_SOURCED__
36 /* Part of <dbt.h> is made available for selective inclusion by <winuser.h>;
37 * define the <dbt.h> multiple inclusion guard only when NOT included as an
38 * adjunct to <winuser.h>
42 /* When including <dbt.h> in its own right, ensure that the standard set of
43 * W32API utility macros and data types is defined.
49 #define DBT_NO_DISK_SPACE 0x47
50 #define DBT_CONFIGMGPRIVATE 0x7FFF
51 #define DBT_DEVICEARRIVAL 0x8000
52 #define DBT_DEVICEQUERYREMOVE 0x8001
53 #define DBT_DEVICEQUERYREMOVEFAILED 0x8002
54 #define DBT_DEVICEREMOVEPENDING 0x8003
55 #define DBT_DEVICEREMOVECOMPLETE 0x8004
56 #define DBT_DEVICETYPESPECIFIC 0x8005
57 #define DBT_DEVTYP_OEM 0
58 #define DBT_DEVTYP_DEVNODE 1
59 #define DBT_DEVTYP_VOLUME 2
60 #define DBT_DEVTYP_PORT 3
61 #define DBT_DEVTYP_NET 4
63 #if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K
64 #define DBT_DEVTYP_DEVICEINTERFACE 5
65 #define DBT_DEVTYP_HANDLE 6
66 #endif /* >= _WIN32_WINDOWS_98 || >= _WIN32_WINNT_WIN2K */
68 #define DBT_APPYBEGIN 0
70 #define DBT_DEVNODES_CHANGED 7
71 #define DBT_QUERYCHANGECONFIG 0x17
72 #define DBT_CONFIGCHANGED 0x18
73 #define DBT_CONFIGCHANGECANCELED 0x19
74 #define DBT_MONITORCHANGE 0x1B
75 #define DBT_SHELLLOGGEDON 32
76 #define DBT_CONFIGMGAPI32 34
77 #define DBT_VXDINITCOMPLETE 35
78 #define DBT_VOLLOCKQUERYLOCK 0x8041
79 #define DBT_VOLLOCKLOCKTAKEN 0x8042
80 #define DBT_VOLLOCKLOCKFAILED 0x8043
81 #define DBT_VOLLOCKQUERYUNLOCK 0x8044
82 #define DBT_VOLLOCKLOCKRELEASED 0x8045
83 #define DBT_VOLLOCKUNLOCKFAILED 0x8046
84 #define DBT_USERDEFINED 0xFFFF
88 #endif /* !__WINUSER_H_SOURCED__ */
89 /* The following definitions are shared with <winuser.h>; thus, we
90 * ALWAYS define them, whether within the __WINUSER_H_SOURCED__ scope,
91 * or regular inclusion of <dbt.h>
93 #define BSM_ALLCOMPONENTS 0
94 #define BSM_APPLICATIONS 8
95 #define BSM_ALLDESKTOPS 16
96 #define BSM_INSTALLABLEDRIVERS 4
97 #define BSM_NETDRIVER 2
99 #define BSF_FLUSHDISK 0x00000004
100 #define BSF_FORCEIFHUNG 0x00000020
101 #define BSF_IGNORECURRENTTASK 0x00000002
102 #define BSF_NOHANG 0x00000008
103 #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
104 #define BSF_POSTMESSAGE 0x00000010
105 #define BSF_QUERY 0x00000001
107 #if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
108 #define BSF_ALLOWSFW 0x00000080
109 #define BSF_SENDNOTIFYMESSAGE 0x00000100
111 #if _WIN32_WINNT >= _WIN32_WINNT_WINXP
112 #define BSF_LUID 0x00000400
113 #define BSF_RETURNHDESK 0x00000200
115 #endif /* >= _WIN32_WINNT_WINXP */
116 #endif /* >= _WIN32_WINNT_WIN2K */
118 #ifndef __WINUSER_H_SOURCED__
119 /* The remaining definitions are NOT shared with <winuser.h>, so are
120 * NOT defined within the __WINUSER_H_SOURCED__ scope.
122 #define BSF_MSGSRV32ISOK_BIT 31
123 #define BSF_MSGSRV32ISOK 0x80000000
125 typedef struct _DEV_BROADCAST_HDR
127 DWORD dbch_devicetype;
129 } DEV_BROADCAST_HDR, *PDEV_BROADCAST_HDR;
131 typedef struct _DEV_BROADCAST_OEM
133 DWORD dbco_devicetype;
135 DWORD dbco_identifier;
137 } DEV_BROADCAST_OEM, *PDEV_BROADCAST_OEM;
139 typedef struct _DEV_BROADCAST_PORT_A
141 DWORD dbcp_devicetype;
144 } DEV_BROADCAST_PORT_A, *PDEV_BROADCAST_PORT_A;
146 typedef struct _DEV_BROADCAST_PORT_W
148 DWORD dbcp_devicetype;
150 wchar_t dbcp_name[1];
151 } DEV_BROADCAST_PORT_W, *PDEV_BROADCAST_PORT_W;
153 /* Map generic type name references for UNICODE/non-UNICODE usage
154 * of the preceding pair of structured data types.
156 typedef __AW_ALIAS_EX__(DEV_BROADCAST_PORT);
157 typedef __AW_ALIAS_EX__(PDEV_BROADCAST_PORT);
159 typedef struct _DEV_BROADCAST_USERDEFINED
160 { struct _DEV_BROADCAST_HDR dbud_dbh;
162 } DEV_BROADCAST_USERDEFINED;
164 typedef struct _DEV_BROADCAST_VOLUME
166 DWORD dbcv_devicetype;
170 } DEV_BROADCAST_VOLUME, *PDEV_BROADCAST_VOLUME;
172 #if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K
174 typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A
176 DWORD dbcc_devicetype;
180 } DEV_BROADCAST_DEVICEINTERFACE_A, *PDEV_BROADCAST_DEVICEINTERFACE_A;
182 typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W
184 DWORD dbcc_devicetype;
187 wchar_t dbcc_name[1];
188 } DEV_BROADCAST_DEVICEINTERFACE_W, *PDEV_BROADCAST_DEVICEINTERFACE_W;
190 /* Map generic type name references for UNICODE/non-UNICODE usage
191 * of the preceding pair of structured data types.
193 typedef __AW_ALIAS_EX__(DEV_BROADCAST_DEVICEINTERFACE);
194 typedef __AW_ALIAS_EX__(PDEV_BROADCAST_DEVICEINTERFACE);
196 typedef struct _DEV_BROADCAST_HANDLE
198 DWORD dbch_devicetype;
201 DWORD dbch_hdevnotify;
203 LONG dbch_nameoffset;
205 } DEV_BROADCAST_HANDLE, *PDEV_BROADCAST_HANDLE;
206 #endif /* >= _WIN32_WINDOWS_98 || >= _WIN32_WINNT_WIN2K */
210 #endif /* !__WINUSER_H_SOURCED__ */
211 #endif /* !_DBT_H: $RCSfile$: end of file */