1 /***********************************************************************\
2 *                               wininet.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                           by Stewart Gordon                           *
8 *                                                                       *
9 *                       Placed into public domain                       *
10 \***********************************************************************/
11 module win32.wininet;
12 version(Windows):
13 pragma(lib, "wininet");
14 
15 // FIXME: check types and grouping of constants
16 
17 import win32.windows;
18 
19 enum {
20 	INTERNET_INVALID_PORT_NUMBER =    0,
21 	INTERNET_DEFAULT_FTP_PORT    =   21,
22 	INTERNET_DEFAULT_GOPHER_PORT =   70,
23 	INTERNET_DEFAULT_HTTP_PORT   =   80,
24 	INTERNET_DEFAULT_HTTPS_PORT  =  443,
25 	INTERNET_DEFAULT_SOCKS_PORT  = 1080
26 }
27 
28 const size_t
29 	MAX_CACHE_ENTRY_INFO_SIZE       =  4096,
30 	INTERNET_MAX_HOST_NAME_LENGTH   =   256,
31 	INTERNET_MAX_USER_NAME_LENGTH   =   128,
32 	INTERNET_MAX_PASSWORD_LENGTH    =   128,
33 	INTERNET_MAX_PORT_NUMBER_LENGTH =     5,
34 	INTERNET_MAX_PORT_NUMBER_VALUE  = 65535,
35 	INTERNET_MAX_PATH_LENGTH        =  2048,
36 	INTERNET_MAX_SCHEME_LENGTH      =    32,
37 	INTERNET_MAX_URL_LENGTH         = INTERNET_MAX_SCHEME_LENGTH
38 	                                  + "://".length
39 	                                  + INTERNET_MAX_PATH_LENGTH;
40 
41 enum : DWORD {
42 	INTERNET_KEEP_ALIVE_UNKNOWN  = DWORD.max,
43 	INTERNET_KEEP_ALIVE_DISABLED = 0,
44 	INTERNET_KEEP_ALIVE_ENABLED
45 }
46 
47 enum {
48 	INTERNET_REQFLAG_FROM_CACHE = 1,
49 	INTERNET_REQFLAG_ASYNC      = 2
50 }
51 
52 const DWORD
53 	INTERNET_FLAG_RELOAD                   = 0x80000000,
54 	INTERNET_FLAG_RAW_DATA                 = 0x40000000,
55 	INTERNET_FLAG_EXISTING_CONNECT         = 0x20000000,
56 	INTERNET_FLAG_ASYNC                    = 0x10000000,
57 	INTERNET_FLAG_PASSIVE                  = 0x08000000,
58 	INTERNET_FLAG_NO_CACHE_WRITE           = 0x04000000,
59 	INTERNET_FLAG_DONT_CACHE               = INTERNET_FLAG_NO_CACHE_WRITE,
60 	INTERNET_FLAG_MAKE_PERSISTENT          = 0x02000000,
61 	INTERNET_FLAG_OFFLINE                  = 0x01000000,
62 	INTERNET_FLAG_SECURE                   = 0x00800000,
63 	INTERNET_FLAG_KEEP_CONNECTION          = 0x00400000,
64 	INTERNET_FLAG_NO_AUTO_REDIRECT         = 0x00200000,
65 	INTERNET_FLAG_READ_PREFETCH            = 0x00100000,
66 	INTERNET_FLAG_NO_COOKIES               = 0x00080000,
67 	INTERNET_FLAG_NO_AUTH                  = 0x00040000,
68 	INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP  = 0x00008000,
69 	INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS = 0x00004000,
70 	INTERNET_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000,
71 	INTERNET_FLAG_IGNORE_CERT_CN_INVALID   = 0x00001000,
72 	INTERNET_FLAG_RESYNCHRONIZE            = 0x00000800,
73 	INTERNET_FLAG_HYPERLINK                = 0x00000400,
74 	INTERNET_FLAG_NO_UI                    = 0x00000200,
75 	INTERNET_FLAG_PRAGMA_NOCACHE           = 0x00000100,
76 	INTERNET_FLAG_MUST_CACHE_REQUEST       = 0x00000010,
77 	INTERNET_FLAG_TRANSFER_ASCII           = FTP_TRANSFER_TYPE_ASCII,
78 	INTERNET_FLAG_TRANSFER_BINARY          = FTP_TRANSFER_TYPE_BINARY,
79 
80 	SECURITY_INTERNET_MASK                 = 0x0000F000,
81 	SECURITY_SET_MASK                      = SECURITY_INTERNET_MASK,
82 
83 	INTERNET_FLAGS_MASK                    = 0xFFFCFE13,
84 	INTERNET_OPTIONS_MASK                  = ~INTERNET_FLAGS_MASK;
85 
86 const INTERNET_NO_CALLBACK = 0;
87 const INTERNET_RFC1123_FORMAT = 0;
88 const size_t INTERNET_RFC1123_BUFSIZE = 30;
89 
90 const DWORD
91 	ICU_ESCAPE             = 0x80000000,
92 	ICU_USERNAME           = 0x40000000,
93 	ICU_NO_ENCODE          = 0x20000000,
94 	ICU_DECODE             = 0x10000000,
95 	ICU_NO_META            = 0x08000000,
96 	ICU_ENCODE_SPACES_ONLY = 0x04000000,
97 	ICU_BROWSER_MODE       = 0x02000000;
98 
99 enum {
100 	INTERNET_OPEN_TYPE_PRECONFIG = 0,
101 	INTERNET_OPEN_TYPE_DIRECT    = 1,
102 	INTERNET_OPEN_TYPE_PROXY     = 3,
103 	PRE_CONFIG_INTERNET_ACCESS   = INTERNET_OPEN_TYPE_PRECONFIG,
104 	LOCAL_INTERNET_ACCESS        = INTERNET_OPEN_TYPE_DIRECT,
105 	GATEWAY_INTERNET_ACCESS      = 2,
106 	CERN_PROXY_INTERNET_ACCESS   = INTERNET_OPEN_TYPE_PROXY,
107 }
108 
109 const ISO_GLOBAL      = 1;
110 const ISO_REGISTRY    = 2;
111 const ISO_VALID_FLAGS = ISO_GLOBAL | ISO_REGISTRY;
112 
113 enum {
114 	INTERNET_OPTION_CALLBACK                    =  1,
115 	INTERNET_OPTION_CONNECT_TIMEOUT,
116 	INTERNET_OPTION_CONNECT_RETRIES,
117 	INTERNET_OPTION_CONNECT_BACKOFF,
118 	INTERNET_OPTION_SEND_TIMEOUT,
119 	INTERNET_OPTION_CONTROL_SEND_TIMEOUT        = INTERNET_OPTION_SEND_TIMEOUT,
120 	INTERNET_OPTION_RECEIVE_TIMEOUT,
121 	INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT  = INTERNET_OPTION_RECEIVE_TIMEOUT,
122 	INTERNET_OPTION_DATA_SEND_TIMEOUT,
123 	INTERNET_OPTION_DATA_RECEIVE_TIMEOUT,
124 	INTERNET_OPTION_HANDLE_TYPE,
125 	INTERNET_OPTION_CONTEXT_VALUE,
126 	INTERNET_OPTION_LISTEN_TIMEOUT,
127 	INTERNET_OPTION_READ_BUFFER_SIZE,
128 	INTERNET_OPTION_WRITE_BUFFER_SIZE,       // = 13
129 	INTERNET_OPTION_ASYNC_ID                    = 15,
130 	INTERNET_OPTION_ASYNC_PRIORITY,          // = 16
131 	INTERNET_OPTION_PARENT_HANDLE               = 21,
132 	INTERNET_OPTION_KEEP_CONNECTION,
133 	INTERNET_OPTION_REQUEST_FLAGS,
134 	INTERNET_OPTION_EXTENDED_ERROR,          // = 24
135 	INTERNET_OPTION_OFFLINE_MODE                = 26,
136 	INTERNET_OPTION_CACHE_STREAM_HANDLE,
137 	INTERNET_OPTION_USERNAME,
138 	INTERNET_OPTION_PASSWORD,
139 	INTERNET_OPTION_ASYNC,
140 	INTERNET_OPTION_SECURITY_FLAGS,
141 	INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT,
142 	INTERNET_OPTION_DATAFILE_NAME,
143 	INTERNET_OPTION_URL,
144 	INTERNET_OPTION_SECURITY_CERTIFICATE,
145 	INTERNET_OPTION_SECURITY_KEY_BITNESS,
146 	INTERNET_OPTION_REFRESH,
147 	INTERNET_OPTION_PROXY,
148 	INTERNET_OPTION_SETTINGS_CHANGED,
149 	INTERNET_OPTION_VERSION,
150 	INTERNET_OPTION_USER_AGENT,
151 	INTERNET_OPTION_END_BROWSER_SESSION,
152 	INTERNET_OPTION_PROXY_USERNAME,
153 	INTERNET_OPTION_PROXY_PASSWORD,          // = 44
154 	INTERNET_FIRST_OPTION                       = INTERNET_OPTION_CALLBACK,
155 	// why?
156 	INTERNET_LAST_OPTION                        = INTERNET_OPTION_USER_AGENT
157 }
158 
159 const INTERNET_PRIORITY_FOREGROUND = 1000;
160 
161 enum {
162 	INTERNET_HANDLE_TYPE_INTERNET = 1,
163 	INTERNET_HANDLE_TYPE_CONNECT_FTP,
164 	INTERNET_HANDLE_TYPE_CONNECT_GOPHER,
165 	INTERNET_HANDLE_TYPE_CONNECT_HTTP,
166 	INTERNET_HANDLE_TYPE_FTP_FIND,
167 	INTERNET_HANDLE_TYPE_FTP_FIND_HTML,
168 	INTERNET_HANDLE_TYPE_FTP_FILE,
169 	INTERNET_HANDLE_TYPE_FTP_FILE_HTML,
170 	INTERNET_HANDLE_TYPE_GOPHER_FIND,
171 	INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML,
172 	INTERNET_HANDLE_TYPE_GOPHER_FILE,
173 	INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML,
174 	INTERNET_HANDLE_TYPE_HTTP_REQUEST
175 }
176 
177 const DWORD
178 	SECURITY_FLAG_SECURE                   = 0x00000001,
179 	SECURITY_FLAG_SSL                      = 0x00000002,
180 	SECURITY_FLAG_SSL3                     = 0x00000004,
181 	SECURITY_FLAG_PCT                      = 0x00000008,
182 	SECURITY_FLAG_PCT4                     = 0x00000010,
183 	SECURITY_FLAG_IETFSSL4                 = 0x00000020,
184 	SECURITY_FLAG_IGNORE_REVOCATION        = 0x00000080,
185 	SECURITY_FLAG_IGNORE_UNKNOWN_CA        = 0x00000100,
186 	SECURITY_FLAG_IGNORE_WRONG_USAGE       = 0x00000200,
187 	SECURITY_FLAG_40BIT                    = 0x10000000,
188 	SECURITY_FLAG_128BIT                   = 0x20000000,
189 	SECURITY_FLAG_56BIT                    = 0x40000000,
190 	SECURITY_FLAG_UNKNOWNBIT               = 0x80000000,
191 	SECURITY_FLAG_NORMALBITNESS            = SECURITY_FLAG_40BIT,
192 	SECURITY_FLAG_IGNORE_CERT_CN_INVALID   = INTERNET_FLAG_IGNORE_CERT_CN_INVALID,
193 	SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = INTERNET_FLAG_IGNORE_CERT_DATE_INVALID,
194 	SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS = INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS,
195 	SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP  = INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP;
196 
197 enum {
198 	INTERNET_SERVICE_FTP = 1,
199 	INTERNET_SERVICE_GOPHER,
200 	INTERNET_SERVICE_HTTP
201 }
202 
203 enum {
204 	INTERNET_STATUS_RESOLVING_NAME        =  10,
205 	INTERNET_STATUS_NAME_RESOLVED         =  11,
206 	INTERNET_STATUS_CONNECTING_TO_SERVER  =  20,
207 	INTERNET_STATUS_CONNECTED_TO_SERVER   =  21,
208 	INTERNET_STATUS_SENDING_REQUEST       =  30,
209 	INTERNET_STATUS_REQUEST_SENT          =  31,
210 	INTERNET_STATUS_RECEIVING_RESPONSE    =  40,
211 	INTERNET_STATUS_RESPONSE_RECEIVED     =  41,
212 	INTERNET_STATUS_CTL_RESPONSE_RECEIVED =  42,
213 	INTERNET_STATUS_PREFETCH              =  43,
214 	INTERNET_STATUS_CLOSING_CONNECTION    =  50,
215 	INTERNET_STATUS_CONNECTION_CLOSED     =  51,
216 	INTERNET_STATUS_HANDLE_CREATED        =  60,
217 	INTERNET_STATUS_HANDLE_CLOSING        =  70,
218 	INTERNET_STATUS_REQUEST_COMPLETE      = 100,
219 	INTERNET_STATUS_REDIRECT              = 110
220 }
221 
222 enum {
223 	FTP_TRANSFER_TYPE_UNKNOWN = 0,
224 	FTP_TRANSFER_TYPE_ASCII   = 1,
225 	FTP_TRANSFER_TYPE_BINARY  = 2,
226 	FTP_TRANSFER_TYPE_MASK    = 3
227 }
228 
229 const size_t
230 	MAX_GOPHER_DISPLAY_TEXT   = 128,
231 	MAX_GOPHER_SELECTOR_TEXT  = 256,
232 	MAX_GOPHER_HOST_NAME      = INTERNET_MAX_HOST_NAME_LENGTH,
233 	MAX_GOPHER_LOCATOR_LENGTH
234 	  = 1 + MAX_GOPHER_DISPLAY_TEXT + 1 + MAX_GOPHER_SELECTOR_TEXT + 1
235 	    + MAX_GOPHER_HOST_NAME + 1 + INTERNET_MAX_PORT_NUMBER_LENGTH + 4;
236 
237 const DWORD
238 	GOPHER_TYPE_TEXT_FILE      = 0x00000001,
239 	GOPHER_TYPE_DIRECTORY      = 0x00000002,
240 	GOPHER_TYPE_CSO            = 0x00000004,
241 	GOPHER_TYPE_ERROR          = 0x00000008,
242 	GOPHER_TYPE_MAC_BINHEX     = 0x00000010,
243 	GOPHER_TYPE_DOS_ARCHIVE    = 0x00000020,
244 	GOPHER_TYPE_UNIX_UUENCODED = 0x00000040,
245 	GOPHER_TYPE_INDEX_SERVER   = 0x00000080,
246 	GOPHER_TYPE_TELNET         = 0x00000100,
247 	GOPHER_TYPE_BINARY         = 0x00000200,
248 	GOPHER_TYPE_REDUNDANT      = 0x00000400,
249 	GOPHER_TYPE_TN3270         = 0x00000800,
250 	GOPHER_TYPE_GIF            = 0x00001000,
251 	GOPHER_TYPE_IMAGE          = 0x00002000,
252 	GOPHER_TYPE_BITMAP         = 0x00004000,
253 	GOPHER_TYPE_MOVIE          = 0x00008000,
254 	GOPHER_TYPE_SOUND          = 0x00010000,
255 	GOPHER_TYPE_HTML           = 0x00020000,
256 	GOPHER_TYPE_PDF            = 0x00040000,
257 	GOPHER_TYPE_CALENDAR       = 0x00080000,
258 	GOPHER_TYPE_INLINE         = 0x00100000,
259 	GOPHER_TYPE_UNKNOWN        = 0x20000000,
260 	GOPHER_TYPE_ASK            = 0x40000000,
261 	GOPHER_TYPE_GOPHER_PLUS    = 0x80000000,
262 	GOPHER_TYPE_FILE_MASK      = 0x001FF271;
263 
264 BOOL IS_GOPHER_FILE(DWORD t) {
265 	return !!(t & GOPHER_TYPE_FILE_MASK);
266 }
267 
268 BOOL IS_GOPHER_DIRECTORY(DWORD t) {
269 	return !!(t & GOPHER_TYPE_DIRECTORY);
270 }
271 
272 BOOL IS_GOPHER_PHONE_SERVER(DWORD t) {
273 	return !!(t & GOPHER_TYPE_CSO);
274 }
275 
276 BOOL IS_GOPHER_ERROR(DWORD t) {
277 	return !!(t & GOPHER_TYPE_ERROR);
278 }
279 
280 BOOL IS_GOPHER_INDEX_SERVER(DWORD t) {
281 	return !!(t & GOPHER_TYPE_INDEX_SERVER);
282 }
283 
284 BOOL IS_GOPHER_TELNET_SESSION(DWORD t) {
285 	return !!(t & GOPHER_TYPE_TELNET);
286 }
287 
288 BOOL IS_GOPHER_BACKUP_SERVER(DWORD t) {
289 	return !!(t & GOPHER_TYPE_REDUNDANT);
290 }
291 
292 BOOL IS_GOPHER_TN3270_SESSION(DWORD t) {
293 	return !!(t & GOPHER_TYPE_TN3270);
294 }
295 
296 BOOL IS_GOPHER_ASK(DWORD t) {
297 	return !!(t & GOPHER_TYPE_ASK);
298 }
299 
300 BOOL IS_GOPHER_PLUS(DWORD t) {
301 	return !!(t & GOPHER_TYPE_GOPHER_PLUS);
302 }
303 
304 BOOL IS_GOPHER_TYPE_KNOWN(DWORD t) {
305 	return !(t & GOPHER_TYPE_UNKNOWN);
306 }
307 
308 const size_t
309 	MAX_GOPHER_CATEGORY_NAME    = 128,
310 	MAX_GOPHER_ATTRIBUTE_NAME   = 128,
311 	MIN_GOPHER_ATTRIBUTE_LENGTH = 256;
312 
313 const TCHAR[]
314 	GOPHER_INFO_CATEGORY      = "+INFO",
315 	GOPHER_ADMIN_CATEGORY     = "+ADMIN",
316 	GOPHER_VIEWS_CATEGORY     = "+VIEWS",
317 	GOPHER_ABSTRACT_CATEGORY  = "+ABSTRACT",
318 	GOPHER_VERONICA_CATEGORY  = "+VERONICA",
319 	GOPHER_ADMIN_ATTRIBUTE    = "Admin",
320 	GOPHER_MOD_DATE_ATTRIBUTE = "Mod-Date",
321 	GOPHER_TTL_ATTRIBUTE      = "TTL",
322 	GOPHER_SCORE_ATTRIBUTE    = "Score",
323 	GOPHER_RANGE_ATTRIBUTE    = "Score-range",
324 	GOPHER_SITE_ATTRIBUTE     = "Site",
325 	GOPHER_ORG_ATTRIBUTE      = "Org",
326 	GOPHER_LOCATION_ATTRIBUTE = "Loc",
327 	GOPHER_GEOG_ATTRIBUTE     = "Geog",
328 	GOPHER_TIMEZONE_ATTRIBUTE = "TZ",
329 	GOPHER_PROVIDER_ATTRIBUTE = "Provider",
330 	GOPHER_VERSION_ATTRIBUTE  = "Version",
331 	GOPHER_ABSTRACT_ATTRIBUTE = "Abstract",
332 	GOPHER_VIEW_ATTRIBUTE     = "View",
333 	GOPHER_TREEWALK_ATTRIBUTE = "treewalk";
334 
335 enum : DWORD {
336 	GOPHER_ATTRIBUTE_ID_BASE = 0xABCCCC00,
337 	GOPHER_CATEGORY_ID_ALL,
338 	GOPHER_CATEGORY_ID_INFO,
339 	GOPHER_CATEGORY_ID_ADMIN,
340 	GOPHER_CATEGORY_ID_VIEWS,
341 	GOPHER_CATEGORY_ID_ABSTRACT,
342 	GOPHER_CATEGORY_ID_VERONICA,
343 	GOPHER_CATEGORY_ID_ASK,
344 	GOPHER_CATEGORY_ID_UNKNOWN,
345 	GOPHER_ATTRIBUTE_ID_ALL,
346 	GOPHER_ATTRIBUTE_ID_ADMIN,
347 	GOPHER_ATTRIBUTE_ID_MOD_DATE,
348 	GOPHER_ATTRIBUTE_ID_TTL,
349 	GOPHER_ATTRIBUTE_ID_SCORE,
350 	GOPHER_ATTRIBUTE_ID_RANGE,
351 	GOPHER_ATTRIBUTE_ID_SITE,
352 	GOPHER_ATTRIBUTE_ID_ORG,
353 	GOPHER_ATTRIBUTE_ID_LOCATION,
354 	GOPHER_ATTRIBUTE_ID_GEOG,
355 	GOPHER_ATTRIBUTE_ID_TIMEZONE,
356 	GOPHER_ATTRIBUTE_ID_PROVIDER,
357 	GOPHER_ATTRIBUTE_ID_VERSION,
358 	GOPHER_ATTRIBUTE_ID_ABSTRACT,
359 	GOPHER_ATTRIBUTE_ID_VIEW,
360 	GOPHER_ATTRIBUTE_ID_TREEWALK,
361 	GOPHER_ATTRIBUTE_ID_UNKNOWN
362 }
363 
364 const HTTP_MAJOR_VERSION   = 1;
365 const HTTP_MINOR_VERSION   = 0;
366 const TCHAR[] HTTP_VERSION = "HTTP/1.0";
367 
368 enum : DWORD {
369 	HTTP_QUERY_MIME_VERSION,
370 	HTTP_QUERY_CONTENT_TYPE,
371 	HTTP_QUERY_CONTENT_TRANSFER_ENCODING,
372 	HTTP_QUERY_CONTENT_ID,
373 	HTTP_QUERY_CONTENT_DESCRIPTION,
374 	HTTP_QUERY_CONTENT_LENGTH,
375 	HTTP_QUERY_CONTENT_LANGUAGE,
376 	HTTP_QUERY_ALLOW,
377 	HTTP_QUERY_PUBLIC,
378 	HTTP_QUERY_DATE,
379 	HTTP_QUERY_EXPIRES,
380 	HTTP_QUERY_LAST_MODIFIED,
381 	HTTP_QUERY_MESSAGE_ID,
382 	HTTP_QUERY_URI,
383 	HTTP_QUERY_DERIVED_FROM,
384 	HTTP_QUERY_COST,
385 	HTTP_QUERY_LINK,
386 	HTTP_QUERY_PRAGMA,
387 	HTTP_QUERY_VERSION,
388 	HTTP_QUERY_STATUS_CODE,
389 	HTTP_QUERY_STATUS_TEXT,
390 	HTTP_QUERY_RAW_HEADERS,
391 	HTTP_QUERY_RAW_HEADERS_CRLF,
392 	HTTP_QUERY_CONNECTION,
393 	HTTP_QUERY_ACCEPT,
394 	HTTP_QUERY_ACCEPT_CHARSET,
395 	HTTP_QUERY_ACCEPT_ENCODING,
396 	HTTP_QUERY_ACCEPT_LANGUAGE,
397 	HTTP_QUERY_AUTHORIZATION,
398 	HTTP_QUERY_CONTENT_ENCODING,
399 	HTTP_QUERY_FORWARDED,
400 	HTTP_QUERY_FROM,
401 	HTTP_QUERY_IF_MODIFIED_SINCE,
402 	HTTP_QUERY_LOCATION,
403 	HTTP_QUERY_ORIG_URI,
404 	HTTP_QUERY_REFERER,
405 	HTTP_QUERY_RETRY_AFTER,
406 	HTTP_QUERY_SERVER,
407 	HTTP_QUERY_TITLE,
408 	HTTP_QUERY_USER_AGENT,
409 	HTTP_QUERY_WWW_AUTHENTICATE,
410 	HTTP_QUERY_PROXY_AUTHENTICATE,
411 	HTTP_QUERY_ACCEPT_RANGES,
412 	HTTP_QUERY_SET_COOKIE,
413 	HTTP_QUERY_COOKIE,
414 	HTTP_QUERY_REQUEST_METHOD,
415 	HTTP_QUERY_MAX    = 45,
416 	HTTP_QUERY_CUSTOM = 65535
417 }
418 
419 const DWORD
420 	HTTP_QUERY_FLAG_REQUEST_HEADERS = 0x80000000,
421 	HTTP_QUERY_FLAG_SYSTEMTIME      = 0x40000000,
422 	HTTP_QUERY_FLAG_NUMBER          = 0x20000000,
423 	HTTP_QUERY_FLAG_COALESCE        = 0x10000000,
424 	HTTP_QUERY_MODIFIER_FLAGS_MASK  = 0xF0000000,
425 	HTTP_QUERY_HEADER_MASK          = ~HTTP_QUERY_MODIFIER_FLAGS_MASK;
426 
427 enum {
428 	HTTP_STATUS_OK                 = 200,
429 	HTTP_STATUS_CREATED,
430 	HTTP_STATUS_ACCEPTED,
431 	HTTP_STATUS_PARTIAL,
432 	HTTP_STATUS_NO_CONTENT,     // = 204
433 	HTTP_STATUS_AMBIGUOUS          = 300,
434 	HTTP_STATUS_MOVED,
435 	HTTP_STATUS_REDIRECT,
436 	HTTP_STATUS_REDIRECT_METHOD,
437 	HTTP_STATUS_NOT_MODIFIED,   // = 304
438 	HTTP_STATUS_BAD_REQUEST        = 400,
439 	HTTP_STATUS_DENIED,
440 	HTTP_STATUS_PAYMENT_REQ,
441 	HTTP_STATUS_FORBIDDEN,
442 	HTTP_STATUS_NOT_FOUND,
443 	HTTP_STATUS_BAD_METHOD,
444 	HTTP_STATUS_NONE_ACCEPTABLE,
445 	HTTP_STATUS_PROXY_AUTH_REQ,
446 	HTTP_STATUS_REQUEST_TIMEOUT,
447 	HTTP_STATUS_CONFLICT,
448 	HTTP_STATUS_GONE,
449 	HTTP_STATUS_AUTH_REFUSED,   // = 411
450 	HTTP_STATUS_SERVER_ERROR       = 500,
451 	HTTP_STATUS_NOT_SUPPORTED,
452 	HTTP_STATUS_BAD_GATEWAY,
453 	HTTP_STATUS_SERVICE_UNAVAIL,
454 	HTTP_STATUS_GATEWAY_TIMEOUT // = 504
455 }
456 
457 enum {
458 	INTERNET_PREFETCH_PROGRESS,
459 	INTERNET_PREFETCH_COMPLETE,
460 	INTERNET_PREFETCH_ABORTED
461 }
462 
463 const FLAGS_ERROR_UI_FILTER_FOR_ERRORS    = 0x01;
464 const FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS = 0x02;
465 const FLAGS_ERROR_UI_FLAGS_GENERATE_DATA  = 0x04;
466 const FLAGS_ERROR_UI_FLAGS_NO_UI          = 0x08;
467 
468 const DWORD
469 	HTTP_ADDREQ_INDEX_MASK                   = 0x0000FFFF,
470 	HTTP_ADDREQ_FLAGS_MASK                   = 0xFFFF0000,
471 	HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON = 0x01000000,
472 	HTTP_ADDREQ_FLAG_ADD_IF_NEW              = 0x10000000,
473 	HTTP_ADDREQ_FLAG_ADD                     = 0x20000000,
474 	HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA     = 0x40000000,
475 	HTTP_ADDREQ_FLAG_COALESCE          = HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA,
476 	HTTP_ADDREQ_FLAG_REPLACE                 = 0x80000000;
477 
478 enum {
479 	INTERNET_ERROR_BASE                       = 12000,
480 	ERROR_INTERNET_OUT_OF_HANDLES,
481 	ERROR_INTERNET_TIMEOUT,
482 	ERROR_INTERNET_EXTENDED_ERROR,
483 	ERROR_INTERNET_INTERNAL_ERROR,
484 	ERROR_INTERNET_INVALID_URL,
485 	ERROR_INTERNET_UNRECOGNIZED_SCHEME,
486 	ERROR_INTERNET_NAME_NOT_RESOLVED,
487 	ERROR_INTERNET_PROTOCOL_NOT_FOUND,
488 	ERROR_INTERNET_INVALID_OPTION,
489 	ERROR_INTERNET_BAD_OPTION_LENGTH,
490 	ERROR_INTERNET_OPTION_NOT_SETTABLE,
491 	ERROR_INTERNET_SHUTDOWN,
492 	ERROR_INTERNET_INCORRECT_USER_NAME,
493 	ERROR_INTERNET_INCORRECT_PASSWORD,
494 	ERROR_INTERNET_LOGIN_FAILURE,
495 	ERROR_INTERNET_INVALID_OPERATION,
496 	ERROR_INTERNET_OPERATION_CANCELLED,
497 	ERROR_INTERNET_INCORRECT_HANDLE_TYPE,
498 	ERROR_INTERNET_INCORRECT_HANDLE_STATE,
499 	ERROR_INTERNET_NOT_PROXY_REQUEST,
500 	ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND,
501 	ERROR_INTERNET_BAD_REGISTRY_PARAMETER,
502 	ERROR_INTERNET_NO_DIRECT_ACCESS,
503 	ERROR_INTERNET_NO_CONTEXT,
504 	ERROR_INTERNET_NO_CALLBACK,
505 	ERROR_INTERNET_REQUEST_PENDING,
506 	ERROR_INTERNET_INCORRECT_FORMAT,
507 	ERROR_INTERNET_ITEM_NOT_FOUND,
508 	ERROR_INTERNET_CANNOT_CONNECT,
509 	ERROR_INTERNET_CONNECTION_ABORTED,
510 	ERROR_INTERNET_CONNECTION_RESET,
511 	ERROR_INTERNET_FORCE_RETRY,
512 	ERROR_INTERNET_INVALID_PROXY_REQUEST,
513 	ERROR_INTERNET_NEED_UI,                // = INTERNET_ERROR_BASE +  34
514 	ERROR_INTERNET_HANDLE_EXISTS              = INTERNET_ERROR_BASE +  36,
515 	ERROR_INTERNET_SEC_CERT_DATE_INVALID,
516 	ERROR_INTERNET_SEC_CERT_CN_INVALID,
517 	ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR,
518 	ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR,
519 	ERROR_INTERNET_MIXED_SECURITY,
520 	ERROR_INTERNET_CHG_POST_IS_NON_SECURE,
521 	ERROR_INTERNET_POST_IS_NON_SECURE,
522 	ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED,
523 	ERROR_INTERNET_INVALID_CA,
524 	ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP,
525 	ERROR_INTERNET_ASYNC_THREAD_FAILED,
526 	ERROR_INTERNET_REDIRECT_SCHEME_CHANGE, // = INTERNET_ERROR_BASE +  48
527 
528 	ERROR_FTP_TRANSFER_IN_PROGRESS            = INTERNET_ERROR_BASE + 110,
529 	ERROR_FTP_DROPPED,                     // = INTERNET_ERROR_BASE + 111
530 	ERROR_GOPHER_PROTOCOL_ERROR               = INTERNET_ERROR_BASE + 130,
531 	ERROR_GOPHER_NOT_FILE,
532 	ERROR_GOPHER_DATA_ERROR,
533 	ERROR_GOPHER_END_OF_DATA,
534 	ERROR_GOPHER_INVALID_LOCATOR,
535 	ERROR_GOPHER_INCORRECT_LOCATOR_TYPE,
536 	ERROR_GOPHER_NOT_GOPHER_PLUS,
537 	ERROR_GOPHER_ATTRIBUTE_NOT_FOUND,
538 	ERROR_GOPHER_UNKNOWN_LOCATOR,          // = INTERNET_ERROR_BASE + 138,
539 	ERROR_HTTP_HEADER_NOT_FOUND               = INTERNET_ERROR_BASE + 150,
540 	ERROR_HTTP_DOWNLEVEL_SERVER,
541 	ERROR_HTTP_INVALID_SERVER_RESPONSE,
542 	ERROR_HTTP_INVALID_HEADER,
543 	ERROR_HTTP_INVALID_QUERY_REQUEST,
544 	ERROR_HTTP_HEADER_ALREADY_EXISTS,
545 	ERROR_HTTP_REDIRECT_FAILED,
546 	ERROR_INTERNET_SECURITY_CHANNEL_ERROR,
547 	ERROR_INTERNET_UNABLE_TO_CACHE_FILE,
548 	ERROR_INTERNET_TCPIP_NOT_INSTALLED,
549 	ERROR_HTTP_NOT_REDIRECTED,             // = INTERNET_ERROR_BASE + 160
550 	// why?
551 	INTERNET_ERROR_LAST                  = ERROR_INTERNET_TCPIP_NOT_INSTALLED
552 }
553 
554 
555 const NORMAL_CACHE_ENTRY     = 0x000001;
556 const STABLE_CACHE_ENTRY     = 0x000002;
557 const STICKY_CACHE_ENTRY     = 0x000004;
558 const SPARSE_CACHE_ENTRY     = 0x010000;
559 const OCX_CACHE_ENTRY        = 0x020000;
560 const COOKIE_CACHE_ENTRY     = 0x100000;
561 const URLHISTORY_CACHE_ENTRY = 0x200000;
562 
563 const CACHE_ENTRY_ATTRIBUTE_FC  = 0x0004;
564 const CACHE_ENTRY_HITRATE_FC    = 0x0010;
565 const CACHE_ENTRY_MODTIME_FC    = 0x0040;
566 const CACHE_ENTRY_EXPTIME_FC    = 0x0080;
567 const CACHE_ENTRY_ACCTIME_FC    = 0x0100;
568 const CACHE_ENTRY_SYNCTIME_FC   = 0x0200;
569 const CACHE_ENTRY_HEADERINFO_FC = 0x0400;
570 
571 enum {
572 	WININET_API_FLAG_ASYNC       = 1,
573 	WININET_API_FLAG_SYNC        = 4,
574 	WININET_API_FLAG_USE_CONTEXT = 8
575 }
576 
577 // FIXME: how should these really be grouped?
578 enum {
579 	IRF_ASYNC       = WININET_API_FLAG_ASYNC,
580 	IRF_SYNC        = WININET_API_FLAG_SYNC,
581 	IRF_USE_CONTEXT = WININET_API_FLAG_USE_CONTEXT,
582 }
583 const IRF_NO_WAIT = 8;
584 
585 enum {
586 	HSR_ASYNC = WININET_API_FLAG_ASYNC,
587 	HSR_SYNC = WININET_API_FLAG_SYNC,
588 	HSR_USE_CONTEXT = WININET_API_FLAG_USE_CONTEXT,
589 }
590 
591 const HSR_INITIATE =  8;
592 const HSR_DOWNLOAD = 16;
593 const HSR_CHUNKED  = 32;
594 
595 const INTERNET_DIAL_UNATTENDED              = 0x8000;
596 const INTERNET_DIALSTATE_DISCONNECTED       = 1;
597 const INTERENT_GOONLINE_REFRESH             = 1;
598 const INTERENT_GOONLINE_MASK                = 1;
599 const INTERNET_AUTODIAL_FORCE_ONLINE        = 1;
600 const INTERNET_AUTODIAL_FORCE_UNATTENDED    = 2;
601 const INTERNET_AUTODIAL_FAILIFSECURITYCHECK = 4;
602 const INTERNET_CONNECTION_MODEM             = 0x01;
603 const INTERNET_CONNECTION_LAN               = 0x02;
604 const INTERNET_CONNECTION_PROXY             = 0x04;
605 const INTERNET_CONNECTION_MODEM_BUSY        = 0x08;
606 const INTERNET_RAS_INSTALLED                = 0x10;
607 const INTERNET_CONNECTION_OFFLINE           = 0x20;
608 const INTERNET_CONNECTION_CONFIGURED        = 0x40;
609 
610 enum {
611 	CACHEGROUP_SEARCH_ALL   = 0,
612 	CACHEGROUP_SEARCH_BYURL = 1
613 }
614 
615 enum {
616 	INTERNET_CACHE_GROUP_ADD    = 0,
617 	INTERNET_CACHE_GROUP_REMOVE = 1
618 }
619 
620 mixin DECLARE_HANDLE!("HINTERNET"); // doesn't work - bug
621 /*struct HINTERNET {
622 	HANDLE h;
623 	alias h this;
624 }*/
625 alias HINTERNET* LPHINTERNET;
626 
627 alias LONGLONG GROUPID;
628 alias WORD INTERNET_PORT;
629 alias WORD* LPINTERNET_PORT;
630 
631 enum INTERNET_SCHEME {
632 	INTERNET_SCHEME_PARTIAL = -2,
633 	INTERNET_SCHEME_UNKNOWN,
634 	INTERNET_SCHEME_DEFAULT,
635 	INTERNET_SCHEME_FTP,
636 	INTERNET_SCHEME_GOPHER,
637 	INTERNET_SCHEME_HTTP,
638 	INTERNET_SCHEME_HTTPS,
639 	INTERNET_SCHEME_FILE,
640 	INTERNET_SCHEME_NEWS,
641 	INTERNET_SCHEME_MAILTO,
642 	INTERNET_SCHEME_SOCKS,
643 	INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
644 	INTERNET_SCHEME_LAST = INTERNET_SCHEME_SOCKS
645 }
646 alias INTERNET_SCHEME* LPINTERNET_SCHEME;
647 
648 struct INTERNET_ASYNC_RESULT {
649 	DWORD dwResult;
650 	DWORD dwError;
651 }
652 alias INTERNET_ASYNC_RESULT* LPINTERNET_ASYNC_RESULT;
653 
654 struct INTERNET_PREFETCH_STATUS {
655 	DWORD dwStatus;
656 	DWORD dwSize;
657 }
658 alias INTERNET_PREFETCH_STATUS* LPINTERNET_PREFETCH_STATUS;
659 
660 struct INTERNET_PROXY_INFO {
661 	DWORD dwAccessType;
662 	LPCTSTR lpszProxy;
663 	LPCTSTR lpszProxyBypass;
664 }
665 alias INTERNET_PROXY_INFO* LPINTERNET_PROXY_INFO;
666 
667 struct INTERNET_VERSION_INFO {
668 	DWORD dwMajorVersion;
669 	DWORD dwMinorVersion;
670 }
671 alias INTERNET_VERSION_INFO* LPINTERNET_VERSION_INFO;
672 
673 struct URL_COMPONENTSA {
674 	DWORD           dwStructSize = URL_COMPONENTSA.sizeof;
675 	LPSTR           lpszScheme;
676 	DWORD           dwSchemeLength;
677 	INTERNET_SCHEME nScheme;
678 	LPSTR           lpszHostName;
679 	DWORD           dwHostNameLength;
680 	INTERNET_PORT   nPort;
681 	LPSTR           lpszUserName;
682 	DWORD           dwUserNameLength;
683 	LPSTR           lpszPassword;
684 	DWORD           dwPasswordLength;
685 	LPSTR           lpszUrlPath;
686 	DWORD           dwUrlPathLength;
687 	LPSTR           lpszExtraInfo;
688 	DWORD           dwExtraInfoLength;
689 }
690 alias URL_COMPONENTSA* LPURL_COMPONENTSA;
691 
692 struct URL_COMPONENTSW {
693 	DWORD  dwStructSize = URL_COMPONENTSW.sizeof;
694 	LPWSTR lpszScheme;
695 	DWORD  dwSchemeLength;
696 	INTERNET_SCHEME nScheme;
697 	LPWSTR lpszHostName;
698 	DWORD  dwHostNameLength;
699 	INTERNET_PORT nPort;
700 	LPWSTR lpszUserName;
701 	DWORD  dwUserNameLength;
702 	LPWSTR lpszPassword;
703 	DWORD  dwPasswordLength;
704 	LPWSTR lpszUrlPath;
705 	DWORD  dwUrlPathLength;
706 	LPWSTR lpszExtraInfo;
707 	DWORD  dwExtraInfoLength;
708 }
709 alias URL_COMPONENTSW* LPURL_COMPONENTSW;
710 
711 struct INTERNET_CERTIFICATE_INFO {
712 	FILETIME ftExpiry;
713 	FILETIME ftStart;
714 	LPTSTR   lpszSubjectInfo;
715 	LPTSTR   lpszIssuerInfo;
716 	LPTSTR   lpszProtocolName;
717 	LPTSTR   lpszSignatureAlgName;
718 	LPTSTR   lpszEncryptionAlgName;
719 	DWORD    dwKeySize;
720 }
721 alias INTERNET_CERTIFICATE_INFO* LPINTERNET_CERTIFICATE_INFO;
722 
723 extern (Windows) alias void function(HINTERNET, DWORD, DWORD, PVOID, DWORD)
724   INTERNET_STATUS_CALLBACK;
725 alias INTERNET_STATUS_CALLBACK* LPINTERNET_STATUS_CALLBACK;
726 
727 const INTERNET_INVALID_STATUS_CALLBACK
728   = cast(INTERNET_STATUS_CALLBACK) -1;
729 
730 struct GOPHER_FIND_DATAA {
731 	CHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString;
732 	DWORD    GopherType;
733 	DWORD    SizeLow;
734 	DWORD    SizeHigh;
735 	FILETIME LastModificationTime;
736 	CHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator;
737 }
738 alias GOPHER_FIND_DATAA* LPGOPHER_FIND_DATAA;
739 
740 struct GOPHER_FIND_DATAW {
741 	WCHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString;
742 	DWORD    GopherType;
743 	DWORD    SizeLow;
744 	DWORD    SizeHigh;
745 	FILETIME LastModificationTime;
746 	WCHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator;
747 }
748 alias GOPHER_FIND_DATAW* LPGOPHER_FIND_DATAW;
749 
750 struct GOPHER_ADMIN_ATTRIBUTE_TYPE {
751 	LPCTSTR Comment;
752 	LPCTSTR EmailAddress;
753 }
754 alias GOPHER_ADMIN_ATTRIBUTE_TYPE* LPGOPHER_ADMIN_ATTRIBUTE_TYPE;
755 
756 struct GOPHER_MOD_DATE_ATTRIBUTE_TYPE {
757 	FILETIME DateAndTime;
758 }
759 alias GOPHER_MOD_DATE_ATTRIBUTE_TYPE* LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE;
760 
761 struct GOPHER_TTL_ATTRIBUTE_TYPE {
762 	DWORD Ttl;
763 }
764 alias GOPHER_TTL_ATTRIBUTE_TYPE* LPGOPHER_TTL_ATTRIBUTE_TYPE;
765 
766 struct GOPHER_SCORE_ATTRIBUTE_TYPE {
767 	INT Score;
768 }
769 alias GOPHER_SCORE_ATTRIBUTE_TYPE* LPGOPHER_SCORE_ATTRIBUTE_TYPE;
770 
771 struct GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE {
772 	INT LowerBound;
773 	INT UpperBound;
774 }
775 alias GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE* LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE;
776 
777 struct GOPHER_SITE_ATTRIBUTE_TYPE {
778 	LPCTSTR Site;
779 }
780 alias GOPHER_SITE_ATTRIBUTE_TYPE* LPGOPHER_SITE_ATTRIBUTE_TYPE;
781 
782 struct GOPHER_ORGANIZATION_ATTRIBUTE_TYPE {
783 	LPCTSTR Organization;
784 }
785 alias GOPHER_ORGANIZATION_ATTRIBUTE_TYPE* LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE;
786 
787 struct GOPHER_LOCATION_ATTRIBUTE_TYPE {
788 	LPCTSTR Location;
789 }
790 alias GOPHER_LOCATION_ATTRIBUTE_TYPE* LPGOPHER_LOCATION_ATTRIBUTE_TYPE;
791 
792 struct GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE {
793 	INT DegreesNorth;
794 	INT MinutesNorth;
795 	INT SecondsNorth;
796 	INT DegreesEast;
797 	INT MinutesEast;
798 	INT SecondsEast;
799 }
800 alias GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE*
801   LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE;
802 
803 struct GOPHER_TIMEZONE_ATTRIBUTE_TYPE {
804 	INT Zone;
805 }
806 alias GOPHER_TIMEZONE_ATTRIBUTE_TYPE* LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE;
807 
808 struct GOPHER_PROVIDER_ATTRIBUTE_TYPE {
809 	LPCTSTR Provider;
810 }
811 alias GOPHER_PROVIDER_ATTRIBUTE_TYPE* LPGOPHER_PROVIDER_ATTRIBUTE_TYPE;
812 
813 struct GOPHER_VERSION_ATTRIBUTE_TYPE {
814 	LPCTSTR Version;
815 }
816 alias GOPHER_VERSION_ATTRIBUTE_TYPE* LPGOPHER_VERSION_ATTRIBUTE_TYPE;
817 
818 struct GOPHER_ABSTRACT_ATTRIBUTE_TYPE {
819 	LPCTSTR ShortAbstract;
820 	LPCTSTR AbstractFile;
821 }
822 alias GOPHER_ABSTRACT_ATTRIBUTE_TYPE* LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE;
823 
824 struct GOPHER_VIEW_ATTRIBUTE_TYPE {
825 	LPCTSTR ContentType;
826 	LPCTSTR Language;
827 	DWORD   Size;
828 }
829 alias GOPHER_VIEW_ATTRIBUTE_TYPE* LPGOPHER_VIEW_ATTRIBUTE_TYPE;
830 
831 struct GOPHER_VERONICA_ATTRIBUTE_TYPE {
832 	BOOL TreeWalk;
833 }
834 alias GOPHER_VERONICA_ATTRIBUTE_TYPE* LPGOPHER_VERONICA_ATTRIBUTE_TYPE;
835 
836 struct GOPHER_ASK_ATTRIBUTE_TYPE {
837 	LPCTSTR QuestionType;
838 	LPCTSTR QuestionText;
839 }
840 alias GOPHER_ASK_ATTRIBUTE_TYPE* LPGOPHER_ASK_ATTRIBUTE_TYPE;
841 
842 struct GOPHER_UNKNOWN_ATTRIBUTE_TYPE {
843 	LPCTSTR Text;
844 }
845 alias GOPHER_UNKNOWN_ATTRIBUTE_TYPE* LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE;
846 
847 struct GOPHER_ATTRIBUTE_TYPE {
848 	DWORD CategoryId;
849 	DWORD AttributeId;
850 	union {
851 		GOPHER_ADMIN_ATTRIBUTE_TYPE                 Admin;
852 		GOPHER_MOD_DATE_ATTRIBUTE_TYPE              ModDate;
853 		GOPHER_TTL_ATTRIBUTE_TYPE                   Ttl;
854 		GOPHER_SCORE_ATTRIBUTE_TYPE                 Score;
855 		GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE           ScoreRange;
856 		GOPHER_SITE_ATTRIBUTE_TYPE                  Site;
857 		GOPHER_ORGANIZATION_ATTRIBUTE_TYPE          Organization;
858 		GOPHER_LOCATION_ATTRIBUTE_TYPE              Location;
859 		GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
860 		GOPHER_TIMEZONE_ATTRIBUTE_TYPE              TimeZone;
861 		GOPHER_PROVIDER_ATTRIBUTE_TYPE              Provider;
862 		GOPHER_VERSION_ATTRIBUTE_TYPE               Version;
863 		GOPHER_ABSTRACT_ATTRIBUTE_TYPE              Abstract;
864 		GOPHER_VIEW_ATTRIBUTE_TYPE                  View;
865 		GOPHER_VERONICA_ATTRIBUTE_TYPE              Veronica;
866 		GOPHER_ASK_ATTRIBUTE_TYPE                   Ask;
867 		GOPHER_UNKNOWN_ATTRIBUTE_TYPE               Unknown;
868 	} /+AttributeType;+/
869 }
870 alias GOPHER_ATTRIBUTE_TYPE* LPGOPHER_ATTRIBUTE_TYPE;
871 
872 alias BOOL function(LPGOPHER_ATTRIBUTE_TYPE, DWORD)
873   GOPHER_ATTRIBUTE_ENUMERATOR;
874 
875 struct INTERNET_CACHE_ENTRY_INFOA {
876 	DWORD    dwStructSize = INTERNET_CACHE_ENTRY_INFOA.sizeof;
877 	LPSTR    lpszSourceUrlName;
878 	LPSTR    lpszLocalFileName;
879 	DWORD    CacheEntryType;
880 	DWORD    dwUseCount;
881 	DWORD    dwHitRate;
882 	DWORD    dwSizeLow;
883 	DWORD    dwSizeHigh;
884 	FILETIME LastModifiedTime;
885 	FILETIME ExpireTime;
886 	FILETIME LastAccessTime;
887 	FILETIME LastSyncTime;
888 	PBYTE    lpHeaderInfo;
889 	DWORD    dwHeaderInfoSize;
890 	LPSTR    lpszFileExtension;
891 	DWORD    dwReserved;
892 }
893 alias INTERNET_CACHE_ENTRY_INFOA* LPINTERNET_CACHE_ENTRY_INFOA;
894 
895 struct INTERNET_CACHE_ENTRY_INFOW {
896 	DWORD    dwStructSize = INTERNET_CACHE_ENTRY_INFOW.sizeof;
897 	LPWSTR   lpszSourceUrlName;
898 	LPWSTR   lpszLocalFileName;
899 	DWORD    CacheEntryType;
900 	DWORD    dwUseCount;
901 	DWORD    dwHitRate;
902 	DWORD    dwSizeLow;
903 	DWORD    dwSizeHigh;
904 	FILETIME LastModifiedTime;
905 	FILETIME ExpireTime;
906 	FILETIME LastAccessTime;
907 	FILETIME LastSyncTime;
908 	PBYTE    lpHeaderInfo;
909 	DWORD    dwHeaderInfoSize;
910 	LPWSTR   lpszFileExtension;
911 	DWORD    dwReserved;
912 }
913 alias INTERNET_CACHE_ENTRY_INFOW* LPINTERNET_CACHE_ENTRY_INFOW;
914 
915 struct INTERNET_BUFFERSA {
916 	DWORD              dwStructSize = INTERNET_BUFFERSA.sizeof;
917 	INTERNET_BUFFERSA* Next;
918 	LPCSTR             lpcszHeader;
919 	DWORD              dwHeadersLength;
920 	DWORD              dwHeadersTotal;
921 	LPVOID             lpvBuffer;
922 	DWORD              dwBufferLength;
923 	DWORD              dwBufferTotal;
924 	DWORD              dwOffsetLow;
925 	DWORD              dwOffsetHigh;
926 }
927 alias INTERNET_BUFFERSA* LPINTERNET_BUFFERSA;
928 
929 struct INTERNET_BUFFERSW {
930 	DWORD              dwStructSize = INTERNET_BUFFERSW.sizeof;
931 	INTERNET_BUFFERSW* Next;
932 	LPCWSTR            lpcszHeader;
933 	DWORD              dwHeadersLength;
934 	DWORD              dwHeadersTotal;
935 	LPVOID             lpvBuffer;
936 	DWORD              dwBufferLength;
937 	DWORD              dwBufferTotal;
938 	DWORD              dwOffsetLow;
939 	DWORD              dwOffsetHigh;
940 }
941 alias INTERNET_BUFFERSW* LPINTERNET_BUFFERSW;
942 
943 const size_t
944 	GROUP_OWNER_STORAGE_SIZE =   4,
945 	GROUPNAME_MAX_LENGTH     = 120;
946 
947 struct INTERNET_CACHE_GROUP_INFOA {
948 	DWORD dwGroupSize;
949 	DWORD dwGroupFlags;
950 	DWORD dwGroupType;
951 	DWORD dwDiskUsage;
952 	DWORD dwDiskQuota;
953 	DWORD[GROUP_OWNER_STORAGE_SIZE] dwOwnerStorage;
954 	CHAR[GROUPNAME_MAX_LENGTH]      szGroupName;
955 }
956 alias INTERNET_CACHE_GROUP_INFOA* LPINTERNET_CACHE_GROUP_INFOA;
957 
958 struct INTERNET_CACHE_GROUP_INFOW {
959 	DWORD dwGroupSize;
960 	DWORD dwGroupFlags;
961 	DWORD dwGroupType;
962 	DWORD dwDiskUsage;
963 	DWORD dwDiskQuota;
964 	DWORD[GROUP_OWNER_STORAGE_SIZE] dwOwnerStorage;
965 	WCHAR[GROUPNAME_MAX_LENGTH]     szGroupName;
966 }
967 alias INTERNET_CACHE_GROUP_INFOW* LPINTERNET_CACHE_GROUP_INFOW;
968 
969 extern (Windows) {
970 	BOOL InternetTimeFromSystemTime(SYSTEMTIME*, DWORD, LPSTR, DWORD);
971 	BOOL InternetTimeToSystemTime(LPCSTR, SYSTEMTIME*, DWORD);
972 	BOOL InternetDebugGetLocalTime(SYSTEMTIME*, PDWORD);
973 	BOOL InternetCrackUrlA(LPCSTR, DWORD, DWORD, LPURL_COMPONENTSA);
974 	BOOL InternetCrackUrlW(LPCWSTR, DWORD, DWORD, LPURL_COMPONENTSW);
975 	BOOL InternetCreateUrlA(LPURL_COMPONENTSA, DWORD, LPSTR, PDWORD);
976 	BOOL InternetCreateUrlW(LPURL_COMPONENTSW, DWORD, LPWSTR, PDWORD);
977 	BOOL InternetCanonicalizeUrlA(LPCSTR, LPSTR, PDWORD, DWORD);
978 	BOOL InternetCanonicalizeUrlW(LPCWSTR, LPWSTR, PDWORD, DWORD);
979 	BOOL InternetCheckConnectionA(LPCSTR, DWORD, DWORD);
980 	BOOL InternetCheckConnectionW(LPCWSTR, DWORD, DWORD);
981 	BOOL InternetCombineUrlA(LPCSTR, LPCSTR, LPSTR, PDWORD, DWORD);
982 	BOOL InternetCombineUrlW(LPCWSTR, LPCWSTR, LPWSTR, PDWORD, DWORD);
983 	HINTERNET InternetOpenA(LPCSTR, DWORD, LPCSTR, LPCSTR, DWORD);
984 	HINTERNET InternetOpenW(LPCWSTR, DWORD, LPCWSTR, LPCWSTR, DWORD);
985 	BOOL InternetCloseHandle(HINTERNET);
986 	HINTERNET InternetConnectA(HINTERNET, LPCSTR, INTERNET_PORT, LPCSTR,
987 	  LPCSTR, DWORD, DWORD, DWORD);
988 	HINTERNET InternetConnectW(HINTERNET, LPCWSTR, INTERNET_PORT, LPCWSTR,
989 	  LPCWSTR, DWORD, DWORD, DWORD);
990 	HINTERNET InternetOpenUrlA(HINTERNET, LPCSTR, LPCSTR, DWORD, DWORD,
991 	  DWORD);
992 	HINTERNET InternetOpenUrlW(HINTERNET, LPCWSTR, LPCWSTR, DWORD, DWORD,
993 	  DWORD);
994 	BOOL InternetReadFile(HINTERNET, PVOID, DWORD, PDWORD);
995 	DWORD InternetSetFilePointer(HINTERNET, LONG, PVOID, DWORD, DWORD);
996 	BOOL InternetWriteFile(HINTERNET, LPCVOID, DWORD, PDWORD);
997 	BOOL InternetQueryDataAvailable(HINTERNET, PDWORD, DWORD, DWORD);
998 	BOOL InternetFindNextFileA(HINTERNET, PVOID);
999 	BOOL InternetFindNextFileW(HINTERNET, PVOID);
1000 	BOOL InternetQueryOptionA(HINTERNET, DWORD, PVOID, PDWORD);
1001 	BOOL InternetQueryOptionW(HINTERNET, DWORD, PVOID, PDWORD);
1002 	BOOL InternetSetOptionA(HINTERNET, DWORD, PVOID, DWORD);
1003 	BOOL InternetSetOptionW(HINTERNET, DWORD, PVOID, DWORD);
1004 	BOOL InternetSetOptionExA(HINTERNET, DWORD, PVOID, DWORD, DWORD);
1005 	BOOL InternetSetOptionExW(HINTERNET, DWORD, PVOID, DWORD, DWORD);
1006 	BOOL InternetGetLastResponseInfoA(PDWORD, LPSTR, PDWORD);
1007 	BOOL InternetGetLastResponseInfoW(PDWORD, LPWSTR, PDWORD);
1008 	INTERNET_STATUS_CALLBACK InternetSetStatusCallback(HINTERNET,
1009 	  INTERNET_STATUS_CALLBACK);
1010 	DWORD FtpGetFileSize(HINTERNET, LPDWORD);
1011 	HINTERNET FtpFindFirstFileA(HINTERNET, LPCSTR, LPWIN32_FIND_DATA, DWORD,
1012 	  DWORD);
1013 	HINTERNET FtpFindFirstFileW(HINTERNET, LPCWSTR, LPWIN32_FIND_DATA, DWORD,
1014 	  DWORD);
1015 	BOOL FtpGetFileA(HINTERNET, LPCSTR, LPCSTR, BOOL, DWORD, DWORD, DWORD);
1016 	BOOL FtpGetFileW(HINTERNET, LPCWSTR, LPCWSTR, BOOL, DWORD, DWORD, DWORD);
1017 	BOOL FtpPutFileA(HINTERNET, LPCSTR, LPCSTR, DWORD, DWORD);
1018 	BOOL FtpPutFileW(HINTERNET, LPCWSTR, LPCWSTR, DWORD, DWORD);
1019 	BOOL FtpDeleteFileA(HINTERNET, LPCSTR);
1020 	BOOL FtpDeleteFileW(HINTERNET, LPCWSTR);
1021 	BOOL FtpRenameFileA(HINTERNET, LPCSTR, LPCSTR);
1022 	BOOL FtpRenameFileW(HINTERNET, LPCWSTR, LPCWSTR);
1023 	HINTERNET FtpOpenFileA(HINTERNET, LPCSTR, DWORD, DWORD, DWORD);
1024 	HINTERNET FtpOpenFileW(HINTERNET, LPCWSTR, DWORD, DWORD, DWORD);
1025 	BOOL FtpCreateDirectoryA(HINTERNET, LPCSTR);
1026 	BOOL FtpCreateDirectoryW(HINTERNET, LPCWSTR);
1027 	BOOL FtpRemoveDirectoryA(HINTERNET, LPCSTR);
1028 	BOOL FtpRemoveDirectoryW(HINTERNET, LPCWSTR);
1029 	BOOL FtpSetCurrentDirectoryA(HINTERNET, LPCSTR);
1030 	BOOL FtpSetCurrentDirectoryW(HINTERNET, LPCWSTR);
1031 	BOOL FtpGetCurrentDirectoryA(HINTERNET, LPSTR, PDWORD);
1032 	BOOL FtpGetCurrentDirectoryW(HINTERNET, LPWSTR, PDWORD);
1033 	BOOL FtpCommandA(HINTERNET, BOOL, DWORD, LPCSTR, DWORD_PTR, HINTERNET*);
1034 	BOOL FtpCommandW(HINTERNET, BOOL, DWORD, LPCWSTR, DWORD_PTR, HINTERNET*);
1035 	BOOL GopherCreateLocatorA(LPCSTR, INTERNET_PORT, LPCSTR, LPCSTR, DWORD,
1036 	  LPSTR, PDWORD);
1037 	BOOL GopherCreateLocatorW(LPCWSTR, INTERNET_PORT, LPCWSTR, LPCWSTR, DWORD,
1038 	  LPWSTR, PDWORD);
1039 	BOOL GopherGetLocatorTypeA(LPCSTR, PDWORD);
1040 	BOOL GopherGetLocatorTypeW(LPCWSTR, PDWORD);
1041 	HINTERNET GopherFindFirstFileA(HINTERNET, LPCSTR, LPCSTR,
1042 	  LPGOPHER_FIND_DATAA, DWORD, DWORD);
1043 	HINTERNET GopherFindFirstFileW(HINTERNET, LPCWSTR, LPCWSTR,
1044 	  LPGOPHER_FIND_DATAW, DWORD, DWORD);
1045 	HINTERNET GopherOpenFileA(HINTERNET, LPCSTR, LPCSTR, DWORD, DWORD);
1046 	HINTERNET GopherOpenFileW(HINTERNET, LPCWSTR, LPCWSTR, DWORD, DWORD);
1047 	BOOL GopherGetAttributeA(HINTERNET, LPCSTR, LPCSTR, LPBYTE, DWORD,
1048 	  PDWORD, GOPHER_ATTRIBUTE_ENUMERATOR, DWORD);
1049 	BOOL GopherGetAttributeW(HINTERNET, LPCWSTR, LPCWSTR, LPBYTE, DWORD,
1050 	  PDWORD, GOPHER_ATTRIBUTE_ENUMERATOR, DWORD);
1051 	HINTERNET HttpOpenRequestA(HINTERNET, LPCSTR, LPCSTR, LPCSTR, LPCSTR,
1052 	  LPCSTR*, DWORD, DWORD);
1053 	HINTERNET HttpOpenRequestW(HINTERNET, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR,
1054 	  LPCWSTR*, DWORD, DWORD);
1055 	BOOL HttpAddRequestHeadersA(HINTERNET, LPCSTR, DWORD, DWORD);
1056 	BOOL HttpAddRequestHeadersW(HINTERNET, LPCWSTR, DWORD, DWORD);
1057 	BOOL HttpSendRequestA(HINTERNET, LPCSTR, DWORD, PVOID, DWORD);
1058 	BOOL HttpSendRequestW(HINTERNET, LPCWSTR, DWORD, PVOID, DWORD);
1059 	BOOL HttpQueryInfoA(HINTERNET, DWORD, PVOID, PDWORD, PDWORD);
1060 	BOOL HttpQueryInfoW(HINTERNET, DWORD, PVOID, PDWORD, PDWORD);
1061 	BOOL InternetSetCookieA(LPCSTR, LPCSTR, LPCSTR);
1062 	BOOL InternetSetCookieW(LPCWSTR, LPCWSTR, LPCWSTR);
1063 	BOOL InternetGetCookieA(LPCSTR, LPCSTR, LPSTR, PDWORD);
1064 	BOOL InternetGetCookieW(LPCWSTR, LPCWSTR, LPWSTR, PDWORD);
1065 	DWORD InternetAttemptConnect(DWORD);
1066 	DWORD InternetErrorDlg(HWND, HINTERNET, DWORD, DWORD, PVOID*);
1067 	DWORD InternetConfirmZoneCrossing(HWND, LPSTR, LPSTR, BOOL);
1068 	BOOL CreateUrlCacheEntryA(LPCSTR, DWORD, LPCSTR, LPSTR, DWORD);
1069 	BOOL CreateUrlCacheEntryW(LPCWSTR, DWORD, LPCWSTR, LPWSTR, DWORD);
1070 	BOOL CommitUrlCacheEntryA(LPCSTR, LPCSTR, FILETIME, FILETIME, DWORD,
1071 	  LPBYTE, DWORD, LPCSTR, DWORD);
1072 	BOOL CommitUrlCacheEntryW(LPCWSTR, LPCWSTR, FILETIME, FILETIME, DWORD,
1073 	  LPBYTE, DWORD, LPCWSTR, DWORD);
1074 	BOOL RetrieveUrlCacheEntryFileA(LPCSTR, LPINTERNET_CACHE_ENTRY_INFOA,
1075 	  PDWORD, DWORD);
1076 	BOOL RetrieveUrlCacheEntryFileW(LPCWSTR, LPINTERNET_CACHE_ENTRY_INFOW,
1077 	  PDWORD, DWORD);
1078 	BOOL UnlockUrlCacheEntryFile(LPCSTR, DWORD);
1079 	HANDLE RetrieveUrlCacheEntryStreamA(LPCSTR, LPINTERNET_CACHE_ENTRY_INFOA,
1080 	  PDWORD, BOOL, DWORD);
1081 	HANDLE RetrieveUrlCacheEntryStreamW(LPCWSTR, LPINTERNET_CACHE_ENTRY_INFOW,
1082 	  PDWORD, BOOL, DWORD);
1083 	BOOL ReadUrlCacheEntryStream(HANDLE, DWORD, PVOID, PDWORD, DWORD);
1084 	BOOL UnlockUrlCacheEntryStream(HANDLE, DWORD);
1085 	BOOL GetUrlCacheEntryInfoA(LPCSTR, LPINTERNET_CACHE_ENTRY_INFOA, PDWORD);
1086 	BOOL GetUrlCacheEntryInfoW(LPCWSTR, LPINTERNET_CACHE_ENTRY_INFOW, PDWORD);
1087 	BOOL SetUrlCacheEntryInfoA(LPCSTR, LPINTERNET_CACHE_ENTRY_INFOA, DWORD);
1088 	BOOL SetUrlCacheEntryInfoW(LPCWSTR, LPINTERNET_CACHE_ENTRY_INFOW, DWORD);
1089 	HANDLE FindFirstUrlCacheEntryA(LPCSTR, LPINTERNET_CACHE_ENTRY_INFOA,
1090 	  PDWORD);
1091 	HANDLE FindFirstUrlCacheEntryW(LPCWSTR, LPINTERNET_CACHE_ENTRY_INFOW,
1092 	  PDWORD);
1093 	BOOL FindNextUrlCacheEntryA(HANDLE, LPINTERNET_CACHE_ENTRY_INFOA, PDWORD);
1094 	BOOL FindNextUrlCacheEntryW(HANDLE, LPINTERNET_CACHE_ENTRY_INFOW, PDWORD);
1095 	BOOL FindCloseUrlCache(HANDLE);
1096 	BOOL DeleteUrlCacheEntry(LPCSTR);
1097 	DWORD AuthenticateUser(PVOID*, LPSTR, LPSTR, DWORD, LPSTR, DWORD, LPSTR,
1098 	  LPSTR);
1099 	BOOL HttpSendRequestExA(HINTERNET, LPINTERNET_BUFFERSA,
1100 	  LPINTERNET_BUFFERSA, DWORD, DWORD);
1101 	BOOL HttpSendRequestExW(HINTERNET, LPINTERNET_BUFFERSW,
1102 	  LPINTERNET_BUFFERSW, DWORD, DWORD);
1103 	BOOL HttpEndRequestA(HINTERNET, LPINTERNET_BUFFERSA, DWORD, DWORD);
1104 	BOOL HttpEndRequestW(HINTERNET, LPINTERNET_BUFFERSW, DWORD, DWORD);
1105 	DWORD InternetDial(HWND, LPTSTR, DWORD, LPDWORD, DWORD);
1106 	DWORD InternetHangUp(DWORD, DWORD);
1107 	BOOL InternetGoOnline(LPTSTR, HWND, DWORD);
1108 	BOOL InternetAutodial(DWORD, DWORD);
1109 	BOOL InternetAutodialHangup(DWORD);
1110 	BOOL InternetGetConnectedState(LPDWORD, DWORD);
1111 	BOOL InternetSetDialState(LPCTSTR, DWORD, DWORD);
1112 	BOOL InternetReadFileExA(HINTERNET, LPINTERNET_BUFFERSA, DWORD, DWORD_PTR);
1113 	BOOL InternetReadFileExW(HINTERNET, LPINTERNET_BUFFERSW, DWORD, DWORD_PTR);
1114 	GROUPID CreateUrlCacheGroup(DWORD, LPVOID);
1115 	BOOL DeleteUrlCacheGroup(GROUPID, DWORD, LPVOID);
1116 	HANDLE FindFirstUrlCacheGroup(DWORD, DWORD, LPVOID, DWORD, GROUPID*,
1117 	  LPVOID);
1118 	BOOL FindNextUrlCacheGroup(HANDLE, GROUPID*, LPVOID);
1119 	BOOL GetUrlCacheGroupAttributeA(GROUPID, DWORD, DWORD,
1120 	  LPINTERNET_CACHE_GROUP_INFOA, LPDWORD, LPVOID);
1121 	BOOL GetUrlCacheGroupAttributeW(GROUPID, DWORD, DWORD,
1122 	  LPINTERNET_CACHE_GROUP_INFOW, LPDWORD, LPVOID);
1123 	BOOL SetUrlCacheGroupAttributeA(GROUPID, DWORD, DWORD,
1124 	  LPINTERNET_CACHE_GROUP_INFOA, LPVOID);
1125 	BOOL SetUrlCacheGroupAttributeW(GROUPID, DWORD, DWORD,
1126 	  LPINTERNET_CACHE_GROUP_INFOW, LPVOID);
1127 }
1128 
1129 version (Unicode) {
1130 	alias URL_COMPONENTSW URL_COMPONENTS;
1131 	alias LPURL_COMPONENTSW LPURL_COMPONENTS;
1132 	alias GOPHER_FIND_DATAW GOPHER_FIND_DATA;
1133 	alias LPGOPHER_FIND_DATAW LPGOPHER_FIND_DATA;
1134 	alias INTERNET_CACHE_ENTRY_INFOW INTERNET_CACHE_ENTRY_INFO;
1135 	alias LPINTERNET_CACHE_ENTRY_INFOW LPINTERNET_CACHE_ENTRY_INFO;
1136 	alias INTERNET_BUFFERSW INTERNET_BUFFERS;
1137 	alias INTERNET_CACHE_GROUP_INFOW INTERNET_CACHE_GROUP_INFO;
1138 	alias LPINTERNET_CACHE_GROUP_INFOW LPINTERNET_CACHE_GROUP_INFO;
1139 	alias InternetCrackUrlW InternetCrackUrl;
1140 	alias InternetCreateUrlW InternetCreateUrl;
1141 	alias InternetCanonicalizeUrlW InternetCanonicalizeUrl;
1142 	alias InternetCheckConnectionW InternetCheckConnection;
1143 	alias InternetCombineUrlW InternetCombineUrl;
1144 	alias InternetOpenW InternetOpen;
1145 	alias InternetConnectW InternetConnect;
1146 	alias InternetOpenUrlW InternetOpenUrl;
1147 	alias InternetFindNextFileW InternetFindNextFile;
1148 	alias InternetQueryOptionW InternetQueryOption;
1149 	alias InternetSetOptionW InternetSetOption;
1150 	alias InternetSetOptionExW InternetSetOptionEx;
1151 	alias InternetGetLastResponseInfoW InternetGetLastResponseInfo;
1152 	alias InternetReadFileExW InternetReadFileEx;
1153 	alias FtpFindFirstFileW FtpFindFirstFile;
1154 	alias FtpGetFileW FtpGetFile;
1155 	alias FtpPutFileW FtpPutFile;
1156 	alias FtpDeleteFileW FtpDeleteFile;
1157 	alias FtpRenameFileW FtpRenameFile;
1158 	alias FtpOpenFileW FtpOpenFile;
1159 	alias FtpCreateDirectoryW FtpCreateDirectory;
1160 	alias FtpRemoveDirectoryW FtpRemoveDirectory;
1161 	alias FtpSetCurrentDirectoryW FtpSetCurrentDirectory;
1162 	alias FtpGetCurrentDirectoryW FtpGetCurrentDirectory;
1163 	alias FtpCommandW FtpCommand;
1164 	alias GopherGetLocatorTypeW GopherGetLocatorType;
1165 	alias GopherCreateLocatorW GopherCreateLocator;
1166 	alias GopherFindFirstFileW GopherFindFirstFile;
1167 	alias GopherOpenFileW GopherOpenFile;
1168 	alias GopherGetAttributeW GopherGetAttribute;
1169 	alias HttpSendRequestW HttpSendRequest;
1170 	alias HttpOpenRequestW HttpOpenRequest;
1171 	alias HttpAddRequestHeadersW HttpAddRequestHeaders;
1172 	alias HttpQueryInfoW HttpQueryInfo;
1173 	alias InternetSetCookieW InternetSetCookie;
1174 	alias InternetGetCookieW InternetGetCookie;
1175 	alias CreateUrlCacheEntryW CreateUrlCacheEntry;
1176 	alias RetrieveUrlCacheEntryStreamW RetrieveUrlCacheEntryStream;
1177 	alias FindNextUrlCacheEntryW FindNextUrlCacheEntry;
1178 	alias CommitUrlCacheEntryW CommitUrlCacheEntry;
1179 	alias GetUrlCacheEntryInfoW GetUrlCacheEntryInfo;
1180 	alias SetUrlCacheEntryInfoW SetUrlCacheEntryInfo;
1181 	alias FindFirstUrlCacheEntryW FindFirstUrlCacheEntry;
1182 	alias RetrieveUrlCacheEntryFileW RetrieveUrlCacheEntryFile;
1183 	alias HttpSendRequestExW HttpSendRequestEx;
1184 	alias HttpEndRequestW HttpEndRequest;
1185 	alias GetUrlCacheGroupAttributeW GetUrlCacheGroupAttribute;
1186 	alias SetUrlCacheGroupAttributeW SetUrlCacheGroupAttribute;
1187 } else {
1188 	alias URL_COMPONENTSA URL_COMPONENTS;
1189 	alias LPURL_COMPONENTSA LPURL_COMPONENTS;
1190 	alias GOPHER_FIND_DATAA GOPHER_FIND_DATA;
1191 	alias LPGOPHER_FIND_DATAA LPGOPHER_FIND_DATA;
1192 	alias INTERNET_CACHE_ENTRY_INFOA INTERNET_CACHE_ENTRY_INFO;
1193 	alias LPINTERNET_CACHE_ENTRY_INFOA LPINTERNET_CACHE_ENTRY_INFO;
1194 	alias INTERNET_BUFFERSA INTERNET_BUFFERS;
1195 	alias INTERNET_CACHE_GROUP_INFOA INTERNET_CACHE_GROUP_INFO;
1196 	alias LPINTERNET_CACHE_GROUP_INFOA LPINTERNET_CACHE_GROUP_INFO;
1197 	alias GopherGetAttributeA GopherGetAttribute;
1198 	alias InternetCrackUrlA InternetCrackUrl;
1199 	alias InternetCreateUrlA InternetCreateUrl;
1200 	alias InternetCanonicalizeUrlA InternetCanonicalizeUrl;
1201 	alias InternetCheckConnectionA InternetCheckConnection;
1202 	alias InternetCombineUrlA InternetCombineUrl;
1203 	alias InternetOpenA InternetOpen;
1204 	alias InternetConnectA InternetConnect;
1205 	alias InternetOpenUrlA InternetOpenUrl;
1206 	alias InternetFindNextFileA InternetFindNextFile;
1207 	alias InternetQueryOptionA InternetQueryOption;
1208 	alias InternetSetOptionA InternetSetOption;
1209 	alias InternetSetOptionExA InternetSetOptionEx;
1210 	alias InternetGetLastResponseInfoA InternetGetLastResponseInfo;
1211 	alias InternetReadFileExA InternetReadFileEx;
1212 	alias FtpFindFirstFileA FtpFindFirstFile;
1213 	alias FtpGetFileA FtpGetFile;
1214 	alias FtpPutFileA FtpPutFile;
1215 	alias FtpDeleteFileA FtpDeleteFile;
1216 	alias FtpRenameFileA FtpRenameFile;
1217 	alias FtpOpenFileA FtpOpenFile;
1218 	alias FtpCreateDirectoryA FtpCreateDirectory;
1219 	alias FtpRemoveDirectoryA FtpRemoveDirectory;
1220 	alias FtpSetCurrentDirectoryA FtpSetCurrentDirectory;
1221 	alias FtpGetCurrentDirectoryA FtpGetCurrentDirectory;
1222 	alias FtpCommandA FtpCommand;
1223 	alias GopherGetLocatorTypeA GopherGetLocatorType;
1224 	alias GopherCreateLocatorA GopherCreateLocator;
1225 	alias GopherFindFirstFileA GopherFindFirstFile;
1226 	alias GopherOpenFileA GopherOpenFile;
1227 	alias HttpSendRequestA HttpSendRequest;
1228 	alias HttpOpenRequestA HttpOpenRequest;
1229 	alias HttpAddRequestHeadersA HttpAddRequestHeaders;
1230 	alias HttpQueryInfoA HttpQueryInfo;
1231 	alias InternetSetCookieA InternetSetCookie;
1232 	alias InternetGetCookieA InternetGetCookie;
1233 	alias CreateUrlCacheEntryA CreateUrlCacheEntry;
1234 	alias RetrieveUrlCacheEntryStreamA RetrieveUrlCacheEntryStream;
1235 	alias FindNextUrlCacheEntryA FindNextUrlCacheEntry;
1236 	alias CommitUrlCacheEntryA CommitUrlCacheEntry;
1237 	alias GetUrlCacheEntryInfoA GetUrlCacheEntryInfo;
1238 	alias SetUrlCacheEntryInfoA SetUrlCacheEntryInfo;
1239 	alias FindFirstUrlCacheEntryA FindFirstUrlCacheEntry;
1240 	alias RetrieveUrlCacheEntryFileA RetrieveUrlCacheEntryFile;
1241 	alias HttpSendRequestExA HttpSendRequestEx;
1242 	alias HttpEndRequestA HttpEndRequest;
1243 	alias GetUrlCacheGroupAttributeA GetUrlCacheGroupAttribute;
1244 	alias SetUrlCacheGroupAttributeA SetUrlCacheGroupAttribute;
1245 }
1246 
1247 alias INTERNET_BUFFERS* LPINTERNET_BUFFERS;