Differences From Artifact [aebc33dc791d8664]:
- File
src/win32/dbt.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [b2df05f31e090a3d]:
- File
src/win32/dbt.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
21 21 DBT_DEVICEARRIVAL = 0x8000,
22 22 DBT_DEVICEQUERYREMOVE = 0x8001,
23 23 DBT_DEVICEQUERYREMOVEFAILED = 0x8002,
24 24 DBT_DEVICEREMOVEPENDING = 0x8003,
25 25 DBT_DEVICEREMOVECOMPLETE = 0x8004,
26 26 DBT_DEVICETYPESPECIFIC = 0x8005,
27 27 DBT_DEVTYP_OEM = 0,
28 - DBT_DEVTYP_DEVNODE = 1,
29 - DBT_DEVTYP_VOLUME = 2,
30 - DBT_DEVTYP_PORT = 3,
31 - DBT_DEVTYP_NET = 4
32 -}
33 -
34 -static if (_WIN32_WINDOWS >= 0x040A) {
35 - enum : DWORD {
36 - DBT_DEVTYP_DEVICEINTERFACE = 5,
37 - DBT_DEVTYP_HANDLE = 6
38 - }
28 + DBT_DEVTYP_DEVNODE,
29 + DBT_DEVTYP_VOLUME,
30 + DBT_DEVTYP_PORT,
31 + DBT_DEVTYP_NET,
32 + DBT_DEVTYP_DEVICEINTERFACE,
33 + DBT_DEVTYP_HANDLE // = 6
39 34 }
40 35
41 36 enum : DWORD {
42 37 DBT_APPYBEGIN,
43 38 DBT_APPYEND,
44 39 DBT_DEVNODES_CHANGED = 7,
45 40 DBT_QUERYCHANGECONFIG = 0x17,
................................................................................
77 72 BSF_NOTIMEOUTIFNOTHUNG = 0x00000040,
78 73 BSF_POSTMESSAGE = 0x00000010,
79 74 BSF_QUERY = 0x00000001,
80 75 BSF_MSGSRV32ISOK_BIT = 31,
81 76 BSF_MSGSRV32ISOK = 0x80000000
82 77 }
83 78
84 -static if (_WIN32_WINNT >= 0x0500) {
79 +static if (_WIN32_WINNT >= 0x500) {
85 80 enum : DWORD {
86 81 BSF_ALLOWSFW = 0x00000080,
87 82 BSF_SENDNOTIFYMESSAGE = 0x00000100
88 83 }
89 84 }
90 85
91 -static if (_WIN32_WINNT >= 0x0501) {
86 +static if (_WIN32_WINNT >= 0x501) {
92 87 enum : DWORD {
93 88 BSF_LUID = 0x00000400,
94 89 BSF_RETURNHDESK = 0x00000200
95 90 }
96 91 }
97 92
98 93 struct DEV_BROADCAST_HDR {
................................................................................
147 142 version (Unicode) {
148 143 alias DEV_BROADCAST_PORT_W DEV_BROADCAST_PORT;
149 144 } else {
150 145 alias DEV_BROADCAST_PORT_A DEV_BROADCAST_PORT;
151 146 }
152 147 alias DEV_BROADCAST_PORT* PDEV_BROADCAST_PORT;
153 148
154 -static if ((_WIN32_WINDOWS >= 0x0410) || (_WIN32_WINNT >= 0x0500)) {
149 +static if (_WIN32_WINNT >= 0x500) {
155 150 struct DEV_BROADCAST_DEVICEINTERFACE_A {
156 151 DWORD dbcc_size = DEV_BROADCAST_DEVICEINTERFACE_A.sizeof;
157 152 DWORD dbcc_devicetype;
158 153 DWORD dbcc_reserved;
159 154 GUID dbcc_classguid;
160 155 char _dbcc_name;
161 156 char* dbcc_name() { return &_dbcc_name; }