[shlwapi]
[reactos.git] / reactos / include / psdk / shlwapi.h
1 /*
2 * SHLWAPI.DLL functions
3 *
4 * Copyright (C) 2000 Juergen Schmied
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #ifndef __WINE_SHLWAPI_H
22 #define __WINE_SHLWAPI_H
23
24 /* FIXME: #include <specstrings.h> */
25 #include <objbase.h>
26 #include <shtypes.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* defined(__cplusplus) */
31
32 #include <pshpack8.h>
33
34 #ifndef NO_SHLWAPI_REG
35
36 /* Registry functions */
37
38 DWORD WINAPI SHDeleteEmptyKeyA(_In_ HKEY, _In_opt_ LPCSTR);
39 DWORD WINAPI SHDeleteEmptyKeyW(_In_ HKEY, _In_opt_ LPCWSTR);
40 #define SHDeleteEmptyKey WINELIB_NAME_AW(SHDeleteEmptyKey)
41
42 DWORD WINAPI SHDeleteKeyA(_In_ HKEY, _In_opt_ LPCSTR);
43 DWORD WINAPI SHDeleteKeyW(_In_ HKEY, _In_opt_ LPCWSTR);
44 #define SHDeleteKey WINELIB_NAME_AW(SHDeleteKey)
45
46 DWORD WINAPI SHDeleteValueA(_In_ HKEY, _In_opt_ LPCSTR, _In_ LPCSTR);
47 DWORD WINAPI SHDeleteValueW(_In_ HKEY, _In_opt_ LPCWSTR, _In_ LPCWSTR);
48 #define SHDeleteValue WINELIB_NAME_AW(SHDeleteValue)
49
50 DWORD
51 WINAPI
52 SHGetValueA(
53 _In_ HKEY,
54 _In_opt_ LPCSTR,
55 _In_opt_ LPCSTR,
56 _Out_opt_ LPDWORD,
57 _Out_writes_bytes_opt_(*pcbData) LPVOID,
58 _Inout_opt_ LPDWORD pcbData);
59
60 DWORD
61 WINAPI
62 SHGetValueW(
63 _In_ HKEY,
64 _In_opt_ LPCWSTR,
65 _In_opt_ LPCWSTR,
66 _Out_opt_ LPDWORD,
67 _Out_writes_bytes_opt_(*pcbData) LPVOID,
68 _Inout_opt_ LPDWORD pcbData);
69
70 #define SHGetValue WINELIB_NAME_AW(SHGetValue)
71
72 DWORD
73 WINAPI
74 SHSetValueA(
75 _In_ HKEY,
76 _In_opt_ LPCSTR,
77 _In_opt_ LPCSTR,
78 _In_ DWORD,
79 _In_reads_bytes_opt_(cbData) LPCVOID,
80 _In_ DWORD cbData);
81
82 DWORD
83 WINAPI
84 SHSetValueW(
85 _In_ HKEY,
86 _In_opt_ LPCWSTR,
87 _In_opt_ LPCWSTR,
88 _In_ DWORD,
89 _In_reads_bytes_opt_(cbData) LPCVOID,
90 _In_ DWORD cbData);
91
92 #define SHSetValue WINELIB_NAME_AW(SHSetValue)
93
94 DWORD
95 WINAPI
96 SHQueryValueExA(
97 _In_ HKEY,
98 _In_opt_ LPCSTR,
99 _Reserved_ LPDWORD,
100 _Out_opt_ LPDWORD,
101 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
102 _Inout_opt_ LPDWORD pcbData);
103
104 DWORD
105 WINAPI
106 SHQueryValueExW(
107 _In_ HKEY,
108 _In_opt_ LPCWSTR,
109 _Reserved_ LPDWORD,
110 _Out_opt_ LPDWORD,
111 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
112 _Inout_opt_ LPDWORD pcbData);
113
114 #define SHQueryValueEx WINELIB_NAME_AW(SHQueryValueEx)
115
116 LONG
117 WINAPI
118 SHEnumKeyExA(
119 _In_ HKEY,
120 _In_ DWORD,
121 _Out_writes_(*pcchName) LPSTR,
122 _Inout_ LPDWORD pcchName);
123
124 LONG
125 WINAPI
126 SHEnumKeyExW(
127 _In_ HKEY,
128 _In_ DWORD,
129 _Out_writes_(*pcchName) LPWSTR,
130 _Inout_ LPDWORD pcchName);
131
132 #define SHEnumKeyEx WINELIB_NAME_AW(SHEnumKeyEx)
133
134 LONG
135 WINAPI
136 SHEnumValueA(
137 _In_ HKEY,
138 _In_ DWORD,
139 _Out_writes_opt_(*pcchValueName) LPSTR,
140 _Inout_opt_ LPDWORD pcchValueName,
141 _Out_opt_ LPDWORD,
142 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
143 _Inout_opt_ LPDWORD pcbData);
144
145 LONG
146 WINAPI
147 SHEnumValueW(
148 _In_ HKEY,
149 _In_ DWORD,
150 _Out_writes_opt_(*pcchValueName) LPWSTR,
151 _Inout_opt_ LPDWORD pcchValueName,
152 _Out_opt_ LPDWORD,
153 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
154 _Inout_opt_ LPDWORD pcbData);
155
156 #define SHEnumValue WINELIB_NAME_AW(SHEnumValue)
157
158 LONG
159 WINAPI
160 SHQueryInfoKeyA(
161 _In_ HKEY,
162 _Out_opt_ LPDWORD,
163 _Out_opt_ LPDWORD,
164 _Out_opt_ LPDWORD,
165 _Out_opt_ LPDWORD);
166
167 LONG
168 WINAPI
169 SHQueryInfoKeyW(
170 _In_ HKEY,
171 _Out_opt_ LPDWORD,
172 _Out_opt_ LPDWORD,
173 _Out_opt_ LPDWORD,
174 _Out_opt_ LPDWORD);
175
176 #define SHQueryInfoKey WINELIB_NAME_AW(SHQueryInfoKey)
177
178 DWORD
179 WINAPI
180 SHRegGetPathA(
181 _In_ HKEY,
182 _In_opt_ LPCSTR,
183 _In_opt_ LPCSTR,
184 _Out_writes_(MAX_PATH) LPSTR,
185 _In_ DWORD);
186
187 DWORD
188 WINAPI
189 SHRegGetPathW(
190 _In_ HKEY,
191 _In_opt_ LPCWSTR,
192 _In_opt_ LPCWSTR,
193 _Out_writes_(MAX_PATH) LPWSTR,
194 _In_ DWORD);
195
196 #define SHRegGetPath WINELIB_NAME_AW(SHRegGetPath)
197
198 DWORD
199 WINAPI
200 SHRegSetPathA(
201 _In_ HKEY,
202 _In_opt_ LPCSTR,
203 _In_opt_ LPCSTR,
204 _In_ LPCSTR,
205 _In_ DWORD);
206
207 DWORD
208 WINAPI
209 SHRegSetPathW(
210 _In_ HKEY,
211 _In_opt_ LPCWSTR,
212 _In_opt_ LPCWSTR,
213 _In_ LPCWSTR,
214 _In_ DWORD);
215
216 #define SHRegSetPath WINELIB_NAME_AW(SHRegSetPath)
217
218 DWORD
219 WINAPI
220 SHCopyKeyA(
221 _In_ HKEY,
222 _In_opt_ LPCSTR,
223 _In_ HKEY,
224 _Reserved_ DWORD);
225
226 DWORD
227 WINAPI
228 SHCopyKeyW(
229 _In_ HKEY,
230 _In_opt_ LPCWSTR,
231 _In_ HKEY,
232 _Reserved_ DWORD);
233
234 #define SHCopyKey WINELIB_NAME_AW(SHCopyKey)
235
236 HKEY WINAPI SHRegDuplicateHKey(_In_ HKEY);
237
238 /* SHRegGetValue flags */
239 typedef INT SRRF;
240
241 #define SRRF_RT_REG_NONE 0x1
242 #define SRRF_RT_REG_SZ 0x2
243 #define SRRF_RT_REG_EXPAND_SZ 0x4
244 #define SRRF_RT_REG_BINARY 0x8
245 #define SRRF_RT_REG_DWORD 0x10
246 #define SRRF_RT_REG_MULTI_SZ 0x20
247 #define SRRF_RT_REG_QWORD 0x40
248
249 #define SRRF_RT_DWORD (SRRF_RT_REG_BINARY|SRRF_RT_REG_DWORD)
250 #define SRRF_RT_QWORD (SRRF_RT_REG_BINARY|SRRF_RT_REG_QWORD)
251 #define SRRF_RT_ANY 0xffff
252
253 #define SRRF_RM_ANY 0
254 #define SRRF_RM_NORMAL 0x10000
255 #define SRRF_RM_SAFE 0x20000
256 #define SRRF_RM_SAFENETWORK 0x40000
257
258 #define SRRF_NOEXPAND 0x10000000
259 #define SRRF_ZEROONFAILURE 0x20000000
260 #define SRRF_NOVIRT 0x40000000
261
262 LSTATUS
263 WINAPI
264 SHRegGetValueA(
265 _In_ HKEY,
266 _In_opt_ LPCSTR,
267 _In_opt_ LPCSTR,
268 _In_ SRRF,
269 _Out_opt_ LPDWORD,
270 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
271 _Inout_opt_ LPDWORD pcbData);
272
273 LSTATUS
274 WINAPI
275 SHRegGetValueW(
276 _In_ HKEY,
277 _In_opt_ LPCWSTR,
278 _In_opt_ LPCWSTR,
279 _In_ SRRF,
280 _Out_opt_ LPDWORD,
281 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
282 _Inout_opt_ LPDWORD pcbData);
283
284 #define SHRegGetValue WINELIB_NAME_AW(SHRegGetValue)
285
286 /* Undocumented registry functions */
287
288 DWORD WINAPI SHDeleteOrphanKeyA(HKEY,LPCSTR);
289 DWORD WINAPI SHDeleteOrphanKeyW(HKEY,LPCWSTR);
290 #define SHDeleteOrphanKey WINELIB_NAME_AW(SHDeleteOrphanKey)
291
292
293 /* User registry functions */
294
295 typedef enum
296 {
297 SHREGDEL_DEFAULT = 0,
298 SHREGDEL_HKCU = 0x1,
299 SHREGDEL_HKLM = 0x10,
300 SHREGDEL_BOTH = SHREGDEL_HKLM | SHREGDEL_HKCU
301 } SHREGDEL_FLAGS;
302
303 typedef enum
304 {
305 SHREGENUM_DEFAULT = 0,
306 SHREGENUM_HKCU = 0x1,
307 SHREGENUM_HKLM = 0x10,
308 SHREGENUM_BOTH = SHREGENUM_HKLM | SHREGENUM_HKCU
309 } SHREGENUM_FLAGS;
310
311 #define SHREGSET_HKCU 0x1 /* Apply to HKCU if empty */
312 #define SHREGSET_FORCE_HKCU 0x2 /* Always apply to HKCU */
313 #define SHREGSET_HKLM 0x4 /* Apply to HKLM if empty */
314 #define SHREGSET_FORCE_HKLM 0x8 /* Always apply to HKLM */
315 #define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM)
316
317 typedef HANDLE HUSKEY;
318 typedef HUSKEY *PHUSKEY;
319
320 LONG
321 WINAPI
322 SHRegCreateUSKeyA(
323 _In_ LPCSTR,
324 _In_ REGSAM,
325 _In_opt_ HUSKEY,
326 _Out_ PHUSKEY,
327 _In_ DWORD);
328
329 LONG
330 WINAPI
331 SHRegCreateUSKeyW(
332 _In_ LPCWSTR,
333 _In_ REGSAM,
334 _In_opt_ HUSKEY,
335 _Out_ PHUSKEY,
336 _In_ DWORD);
337
338 #define SHRegCreateUSKey WINELIB_NAME_AW(SHRegCreateUSKey)
339
340 LONG
341 WINAPI
342 SHRegOpenUSKeyA(
343 _In_ LPCSTR,
344 _In_ REGSAM,
345 _In_opt_ HUSKEY,
346 _Out_ PHUSKEY,
347 _In_ BOOL);
348
349 LONG
350 WINAPI
351 SHRegOpenUSKeyW(
352 _In_ LPCWSTR,
353 _In_ REGSAM,
354 _In_opt_ HUSKEY,
355 _Out_ PHUSKEY,
356 _In_ BOOL);
357
358 #define SHRegOpenUSKey WINELIB_NAME_AW(SHRegOpenUSKey)
359
360 LONG
361 WINAPI
362 SHRegQueryUSValueA(
363 _In_ HUSKEY,
364 _In_opt_ LPCSTR,
365 _Inout_opt_ LPDWORD,
366 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
367 _Inout_opt_ LPDWORD pcbData,
368 _In_ BOOL,
369 _In_reads_bytes_opt_(dwDefaultDataSize) LPVOID,
370 _In_opt_ DWORD dwDefaultDataSize);
371
372 LONG
373 WINAPI
374 SHRegQueryUSValueW(
375 _In_ HUSKEY,
376 _In_opt_ LPCWSTR,
377 _Inout_opt_ LPDWORD,
378 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
379 _Inout_opt_ LPDWORD pcbData,
380 _In_ BOOL,
381 _In_reads_bytes_opt_(dwDefaultDataSize) LPVOID,
382 _In_opt_ DWORD dwDefaultDataSize);
383
384 #define SHRegQueryUSValue WINELIB_NAME_AW(SHRegQueryUSValue)
385
386 LONG
387 WINAPI
388 SHRegWriteUSValueA(
389 _In_ HUSKEY,
390 _In_ LPCSTR,
391 _In_ DWORD,
392 _In_reads_bytes_(cbData) LPVOID,
393 _In_ DWORD cbData,
394 _In_ DWORD);
395
396 LONG
397 WINAPI
398 SHRegWriteUSValueW(
399 _In_ HUSKEY,
400 _In_ LPCWSTR,
401 _In_ DWORD,
402 _In_reads_bytes_(cbData) LPVOID,
403 _In_ DWORD cbData,
404 _In_ DWORD);
405
406 #define SHRegWriteUSValue WINELIB_NAME_AW(SHRegWriteUSValue)
407
408 LONG
409 WINAPI
410 SHRegDeleteUSValueA(
411 _In_ HUSKEY,
412 _In_ LPCSTR,
413 _In_ SHREGDEL_FLAGS);
414
415 LONG
416 WINAPI
417 SHRegDeleteUSValueW(
418 _In_ HUSKEY,
419 _In_ LPCWSTR,
420 _In_ SHREGDEL_FLAGS);
421
422 #define SHRegDeleteUSValue WINELIB_NAME_AW(SHRegDeleteUSValue)
423
424 LONG
425 WINAPI
426 SHRegDeleteEmptyUSKeyA(
427 _In_ HUSKEY,
428 _In_ LPCSTR,
429 _In_ SHREGDEL_FLAGS);
430
431 LONG
432 WINAPI
433 SHRegDeleteEmptyUSKeyW(
434 _In_ HUSKEY,
435 _In_ LPCWSTR,
436 _In_ SHREGDEL_FLAGS);
437
438 #define SHRegDeleteEmptyUSKey WINELIB_NAME_AW(SHRegDeleteEmptyUSKey)
439
440 LONG
441 WINAPI
442 SHRegEnumUSKeyA(
443 _In_ HUSKEY,
444 _In_ DWORD,
445 _Out_writes_to_(*pcchName, *pcchName) LPSTR,
446 _Inout_ LPDWORD pcchName,
447 _In_ SHREGENUM_FLAGS);
448
449 LONG
450 WINAPI
451 SHRegEnumUSKeyW(
452 _In_ HUSKEY,
453 _In_ DWORD,
454 _Out_writes_to_(*pcchName, *pcchName) LPWSTR,
455 _Inout_ LPDWORD pcchName,
456 _In_ SHREGENUM_FLAGS);
457
458 #define SHRegEnumUSKey WINELIB_NAME_AW(SHRegEnumUSKey)
459
460 LONG
461 WINAPI
462 SHRegEnumUSValueA(
463 _In_ HUSKEY,
464 _In_ DWORD,
465 _Out_writes_to_(*pcchValueName, *pcchValueName) LPSTR,
466 _Inout_ LPDWORD pcchValueName,
467 _Out_opt_ LPDWORD,
468 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
469 _Inout_opt_ LPDWORD pcbData,
470 _In_ SHREGENUM_FLAGS);
471
472 LONG
473 WINAPI
474 SHRegEnumUSValueW(
475 _In_ HUSKEY,
476 _In_ DWORD,
477 _Out_writes_to_(*pcchValueName, *pcchValueName) LPWSTR,
478 _Inout_ LPDWORD pcchValueName,
479 _Out_opt_ LPDWORD,
480 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
481 _Inout_opt_ LPDWORD pcbData,
482 _In_ SHREGENUM_FLAGS);
483
484 #define SHRegEnumUSValue WINELIB_NAME_AW(SHRegEnumUSValue)
485
486 LONG
487 WINAPI
488 SHRegQueryInfoUSKeyA(
489 _In_ HUSKEY,
490 _Out_opt_ LPDWORD,
491 _Out_opt_ LPDWORD,
492 _Out_opt_ LPDWORD,
493 _Out_opt_ LPDWORD,
494 _In_ SHREGENUM_FLAGS);
495
496 LONG
497 WINAPI
498 SHRegQueryInfoUSKeyW(
499 _In_ HUSKEY,
500 _Out_opt_ LPDWORD,
501 _Out_opt_ LPDWORD,
502 _Out_opt_ LPDWORD,
503 _Out_opt_ LPDWORD,
504 _In_ SHREGENUM_FLAGS);
505
506 #define SHRegQueryInfoUSKey WINELIB_NAME_AW(SHRegQueryInfoUSKey)
507
508 LONG WINAPI SHRegCloseUSKey(_In_ HUSKEY);
509
510 LONG
511 WINAPI
512 SHRegGetUSValueA(
513 _In_ LPCSTR,
514 _In_opt_ LPCSTR,
515 _Inout_opt_ LPDWORD,
516 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
517 _Inout_opt_ LPDWORD pcbData,
518 _In_ BOOL,
519 _In_reads_bytes_opt_(dwDefaultDataSize) LPVOID,
520 _In_ DWORD dwDefaultDataSize);
521
522 LONG
523 WINAPI
524 SHRegGetUSValueW(
525 _In_ LPCWSTR,
526 _In_opt_ LPCWSTR,
527 _Inout_opt_ LPDWORD,
528 _Out_writes_bytes_to_opt_(*pcbData, *pcbData) LPVOID,
529 _Inout_opt_ LPDWORD pcbData,
530 _In_ BOOL,
531 _In_reads_bytes_opt_(dwDefaultDataSize) LPVOID,
532 _In_ DWORD dwDefaultDataSize);
533
534 #define SHRegGetUSValue WINELIB_NAME_AW(SHRegGetUSValue)
535
536 LONG
537 WINAPI
538 SHRegSetUSValueA(
539 _In_ LPCSTR,
540 _In_ LPCSTR,
541 _In_ DWORD,
542 _In_reads_bytes_opt_(cbData) LPVOID,
543 _In_opt_ DWORD cbData,
544 _In_opt_ DWORD);
545
546 LONG
547 WINAPI
548 SHRegSetUSValueW(
549 _In_ LPCWSTR,
550 _In_ LPCWSTR,
551 _In_ DWORD,
552 _In_reads_bytes_opt_(cbData) LPVOID,
553 _In_opt_ DWORD cbData,
554 _In_opt_ DWORD);
555
556 #define SHRegSetUSValue WINELIB_NAME_AW(SHRegSetUSValue)
557
558 BOOL
559 WINAPI
560 SHRegGetBoolUSValueA(
561 _In_ LPCSTR,
562 _In_opt_ LPCSTR,
563 _In_ BOOL,
564 _In_ BOOL);
565
566 BOOL
567 WINAPI
568 SHRegGetBoolUSValueW(
569 _In_ LPCWSTR,
570 _In_opt_ LPCWSTR,
571 _In_ BOOL,
572 _In_ BOOL);
573
574 #define SHRegGetBoolUSValue WINELIB_NAME_AW(SHRegGetBoolUSValue)
575
576 int WINAPI SHRegGetIntW(_In_ HKEY, _In_opt_ LPCWSTR, _In_ int);
577
578 /* IQueryAssociation and helpers */
579 enum
580 {
581 ASSOCF_INIT_NOREMAPCLSID = 0x001, /* Don't map clsid->progid */
582 ASSOCF_INIT_BYEXENAME = 0x002, /* .exe name given */
583 ASSOCF_OPEN_BYEXENAME = 0x002, /* Synonym */
584 ASSOCF_INIT_DEFAULTTOSTAR = 0x004, /* Use * as base */
585 ASSOCF_INIT_DEFAULTTOFOLDER = 0x008, /* Use folder as base */
586 ASSOCF_NOUSERSETTINGS = 0x010, /* No HKCU reads */
587 ASSOCF_NOTRUNCATE = 0x020, /* Don't truncate return */
588 ASSOCF_VERIFY = 0x040, /* Verify data */
589 ASSOCF_REMAPRUNDLL = 0x080, /* Get rundll args */
590 ASSOCF_NOFIXUPS = 0x100, /* Don't fixup errors */
591 ASSOCF_IGNOREBASECLASS = 0x200, /* Don't read baseclass */
592 ASSOCF_INIT_IGNOREUNKNOWN = 0x400, /* Fail for unknown progid */
593 };
594
595 typedef DWORD ASSOCF;
596
597 typedef enum
598 {
599 ASSOCSTR_COMMAND = 1, /* Verb command */
600 ASSOCSTR_EXECUTABLE, /* .exe from command string */
601 ASSOCSTR_FRIENDLYDOCNAME, /* Friendly doc type name */
602 ASSOCSTR_FRIENDLYAPPNAME, /* Friendly .exe name */
603 ASSOCSTR_NOOPEN, /* noopen value */
604 ASSOCSTR_SHELLNEWVALUE, /* Use shellnew key */
605 ASSOCSTR_DDECOMMAND, /* DDE command template */
606 ASSOCSTR_DDEIFEXEC, /* DDE command for process create */
607 ASSOCSTR_DDEAPPLICATION, /* DDE app name */
608 ASSOCSTR_DDETOPIC, /* DDE topic */
609 ASSOCSTR_INFOTIP, /* Infotip */
610 ASSOCSTR_QUICKTIP, /* Quick infotip */
611 ASSOCSTR_TILEINFO, /* Properties for tileview */
612 ASSOCSTR_CONTENTTYPE, /* Mimetype */
613 ASSOCSTR_DEFAULTICON, /* Icon */
614 ASSOCSTR_SHELLEXTENSION, /* GUID for shell extension handler */
615 ASSOCSTR_MAX
616 } ASSOCSTR;
617
618 typedef enum
619 {
620 ASSOCKEY_SHELLEXECCLASS = 1, /* Key for ShellExec */
621 ASSOCKEY_APP, /* Application */
622 ASSOCKEY_CLASS, /* Progid or class */
623 ASSOCKEY_BASECLASS, /* Base class */
624 ASSOCKEY_MAX
625 } ASSOCKEY;
626
627 typedef enum
628 {
629 ASSOCDATA_MSIDESCRIPTOR = 1, /* Component descriptor */
630 ASSOCDATA_NOACTIVATEHANDLER, /* Don't activate */
631 ASSOCDATA_QUERYCLASSSTORE, /* Look in Class Store */
632 ASSOCDATA_HASPERUSERASSOC, /* Use user association */
633 ASSOCDATA_EDITFLAGS, /* Edit flags */
634 ASSOCDATA_VALUE, /* pszExtra is value */
635 ASSOCDATA_MAX
636 } ASSOCDATA;
637
638 typedef enum
639 {
640 ASSOCENUM_NONE
641 } ASSOCENUM;
642
643 typedef struct IQueryAssociations *LPQUERYASSOCIATIONS;
644
645 #define INTERFACE IQueryAssociations
646 DECLARE_INTERFACE_(IQueryAssociations,IUnknown)
647 {
648 /*** IUnknown methods ***/
649 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
650 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
651 STDMETHOD_(ULONG,Release)(THIS) PURE;
652 /*** IQueryAssociations methods ***/
653 STDMETHOD(Init)(THIS_ _In_ ASSOCF flags, _In_opt_ LPCWSTR pszAssoc, _In_opt_ HKEY hkProgid, _In_opt_ HWND hwnd) PURE;
654 STDMETHOD(GetString)(THIS_ _In_ ASSOCF flags, _In_ ASSOCSTR str, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _Inout_ DWORD *pcchOut) PURE;
655 STDMETHOD(GetKey)(THIS_ _In_ ASSOCF flags, _In_ ASSOCKEY key, _In_opt_ LPCWSTR pszExtra, _Out_ HKEY *phkeyOut) PURE;
656 STDMETHOD(GetData)(THIS_ _In_ ASSOCF flags, _In_ ASSOCDATA data, _In_opt_ LPCWSTR pszExtra, _Out_writes_bytes_opt_(*pcbOut) LPVOID pvOut, _Inout_opt_ DWORD *pcbOut) PURE;
657 STDMETHOD(GetEnum)(THIS_ _In_ ASSOCF flags, _In_ ASSOCENUM assocenum, _In_opt_ LPCWSTR pszExtra, _In_ REFIID riid, _Outptr_ LPVOID *ppvOut) PURE;
658 };
659 #undef INTERFACE
660
661 #if !defined(__cplusplus) || defined(CINTERFACE)
662 #define IQueryAssociations_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
663 #define IQueryAssociations_AddRef(p) (p)->lpVtbl->AddRef(p)
664 #define IQueryAssociations_Release(p) (p)->lpVtbl->Release(p)
665 #define IQueryAssociations_Init(p,a,b,c,d) (p)->lpVtbl->Init(p,a,b,c,d)
666 #define IQueryAssociations_GetString(p,a,b,c,d,e) (p)->lpVtbl->GetString(p,a,b,c,d,e)
667 #define IQueryAssociations_GetKey(p,a,b,c,d) (p)->lpVtbl->GetKey(p,a,b,c,d)
668 #define IQueryAssociations_GetData(p,a,b,c,d,e) (p)->lpVtbl->GetData(p,a,b,c,d,e)
669 #define IQueryAssociations_GetEnum(p,a,b,c,d,e) (p)->lpVtbl->GetEnum(p,a,b,c,d,e)
670 #endif
671
672 HRESULT WINAPI AssocCreate(_In_ CLSID, _In_ REFIID, _Outptr_ LPVOID*);
673
674 HRESULT
675 WINAPI
676 AssocQueryStringA(
677 _In_ ASSOCF,
678 _In_ ASSOCSTR,
679 _In_ LPCSTR,
680 _In_opt_ LPCSTR,
681 _Out_writes_opt_(*pcchOut) LPSTR,
682 _Inout_ LPDWORD pcchOut);
683
684 HRESULT
685 WINAPI
686 AssocQueryStringW(
687 _In_ ASSOCF,
688 _In_ ASSOCSTR,
689 _In_ LPCWSTR,
690 _In_opt_ LPCWSTR,
691 _Out_writes_opt_(*pcchOut) LPWSTR,
692 _Inout_ LPDWORD pcchOut);
693
694 #define AssocQueryString WINELIB_NAME_AW(AssocQueryString)
695
696 HRESULT
697 WINAPI
698 AssocQueryStringByKeyA(
699 _In_ ASSOCF,
700 _In_ ASSOCSTR,
701 _In_ HKEY,
702 _In_opt_ LPCSTR,
703 _Out_writes_opt_(*pcchOut) LPSTR,
704 _Inout_ LPDWORD pcchOut);
705
706 HRESULT
707 WINAPI
708 AssocQueryStringByKeyW(
709 _In_ ASSOCF,
710 _In_ ASSOCSTR,
711 _In_ HKEY,
712 _In_opt_ LPCWSTR,
713 _Out_writes_opt_(*pcchOut) LPWSTR,
714 _Inout_ LPDWORD pcchOut);
715
716 #define AssocQueryStringByKey WINELIB_NAME_AW(AssocQueryStringByKey)
717
718 HRESULT
719 WINAPI
720 AssocQueryKeyA(
721 _In_ ASSOCF,
722 _In_ ASSOCKEY,
723 _In_ LPCSTR,
724 _In_opt_ LPCSTR,
725 _Out_ PHKEY);
726
727 HRESULT
728 WINAPI
729 AssocQueryKeyW(
730 _In_ ASSOCF,
731 _In_ ASSOCKEY,
732 _In_ LPCWSTR,
733 _In_opt_ LPCWSTR,
734 _Out_ PHKEY);
735
736 #define AssocQueryKey WINELIB_NAME_AW(AssocQueryKey)
737
738 BOOL WINAPI AssocIsDangerous(_In_ LPCWSTR);
739
740 #endif /* NO_SHLWAPI_REG */
741
742 void WINAPI IUnknown_Set(_Inout_ IUnknown **ppunk, _In_opt_ IUnknown *punk);
743 void WINAPI IUnknown_AtomicRelease(_Inout_opt_ IUnknown **punk);
744 HRESULT WINAPI IUnknown_GetWindow(_In_ IUnknown *punk, _Out_ HWND *phwnd);
745
746 HRESULT
747 WINAPI
748 IUnknown_SetSite(
749 _In_ IUnknown *punk,
750 _In_opt_ IUnknown *punkSite);
751
752 HRESULT
753 WINAPI
754 IUnknown_GetSite(
755 _In_ IUnknown *punk,
756 _In_ REFIID riid,
757 _Outptr_ void **ppv);
758
759 HRESULT
760 WINAPI
761 IUnknown_QueryService(
762 _In_opt_ IUnknown *punk,
763 _In_ REFGUID guidService,
764 _In_ REFIID riid,
765 _Outptr_ void **ppvOut);
766
767 /* Path functions */
768 #ifndef NO_SHLWAPI_PATH
769
770 /* GetPathCharType return flags */
771 #define GCT_INVALID 0x0
772 #define GCT_LFNCHAR 0x1
773 #define GCT_SHORTCHAR 0x2
774 #define GCT_WILD 0x4
775 #define GCT_SEPARATOR 0x8
776
777 LPSTR WINAPI PathAddBackslashA(_Inout_updates_(MAX_PATH) LPSTR);
778 LPWSTR WINAPI PathAddBackslashW(_Inout_updates_(MAX_PATH) LPWSTR);
779 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
780
781 BOOL
782 WINAPI
783 PathAddExtensionA(
784 _Inout_updates_(MAX_PATH) LPSTR,
785 _In_opt_ LPCSTR);
786
787 BOOL
788 WINAPI
789 PathAddExtensionW(
790 _Inout_updates_(MAX_PATH) LPWSTR,
791 _In_opt_ LPCWSTR);
792
793 #define PathAddExtension WINELIB_NAME_AW(PathAddExtension)
794
795 BOOL WINAPI PathAppendA(_Inout_updates_(MAX_PATH) LPSTR, _In_ LPCSTR);
796 BOOL WINAPI PathAppendW(_Inout_updates_(MAX_PATH) LPWSTR, _In_ LPCWSTR);
797 #define PathAppend WINELIB_NAME_AW(PathAppend)
798
799 LPSTR WINAPI PathBuildRootA(_Out_writes_(4) LPSTR, int);
800 LPWSTR WINAPI PathBuildRootW(_Out_writes_(4) LPWSTR, int);
801 #define PathBuildRoot WINELIB_NAME_AW(PathBuiltRoot)
802
803 BOOL WINAPI PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR, _In_ LPCSTR);
804 BOOL WINAPI PathCanonicalizeW(_Out_writes_(MAX_PATH) LPWSTR, _In_ LPCWSTR);
805 #define PathCanonicalize WINELIB_NAME_AW(PathCanonicalize)
806
807 LPSTR
808 WINAPI
809 PathCombineA(
810 _Out_writes_(MAX_PATH) LPSTR,
811 _In_opt_ LPCSTR,
812 _In_opt_ LPCSTR);
813
814 LPWSTR
815 WINAPI
816 PathCombineW(
817 _Out_writes_(MAX_PATH) LPWSTR,
818 _In_opt_ LPCWSTR,
819 _In_opt_ LPCWSTR);
820
821 #define PathCombine WINELIB_NAME_AW(PathCombine)
822
823 BOOL
824 WINAPI
825 PathCompactPathA(
826 _In_opt_ HDC,
827 _Inout_updates_(MAX_PATH) LPSTR,
828 _In_ UINT);
829
830 BOOL
831 WINAPI
832 PathCompactPathW(
833 _In_opt_ HDC,
834 _Inout_updates_(MAX_PATH) LPWSTR,
835 _In_ UINT);
836
837 #define PathCompactPath WINELIB_NAME_AW(PathCompactPath)
838
839 BOOL
840 WINAPI
841 PathCompactPathExA(
842 _Out_writes_(cchMax) LPSTR,
843 _In_ LPCSTR,
844 _In_ UINT cchMax,
845 _In_ DWORD);
846
847 BOOL
848 WINAPI
849 PathCompactPathExW(
850 _Out_writes_(cchMax) LPWSTR,
851 _In_ LPCWSTR,
852 _In_ UINT cchMax,
853 _In_ DWORD);
854
855 #define PathCompactPathEx WINELIB_NAME_AW(PathCompactPathEx)
856
857 int
858 WINAPI
859 PathCommonPrefixA(
860 _In_ LPCSTR,
861 _In_ LPCSTR,
862 _Out_writes_opt_(MAX_PATH) LPSTR);
863
864 int
865 WINAPI
866 PathCommonPrefixW(
867 _In_ LPCWSTR,
868 _In_ LPCWSTR,
869 _Out_writes_opt_(MAX_PATH) LPWSTR);
870
871 #define PathCommonPrefix WINELIB_NAME_AW(PathCommonPrefix)
872
873 HRESULT
874 WINAPI
875 PathCreateFromUrlA(
876 _In_ LPCSTR,
877 _Out_writes_to_(*pcchPath, *pcchPath) LPSTR,
878 _Inout_ LPDWORD pcchPath,
879 DWORD);
880
881 HRESULT
882 WINAPI
883 PathCreateFromUrlW(
884 _In_ LPCWSTR,
885 _Out_writes_to_(*pcchPath, *pcchPath) LPWSTR,
886 _Inout_ LPDWORD pcchPath,
887 DWORD);
888
889 #define PathCreateFromUrl WINELIB_NAME_AW(PathCreateFromUrl)
890
891 HRESULT WINAPI PathCreateFromUrlAlloc(_In_ LPCWSTR, _Outptr_ LPWSTR*, DWORD);
892
893 BOOL WINAPI PathFileExistsA(_In_ LPCSTR);
894 BOOL WINAPI PathFileExistsW(_In_ LPCWSTR);
895 #define PathFileExists WINELIB_NAME_AW(PathFileExists)
896
897 BOOL WINAPI PathFileExistsAndAttributesA(LPCSTR,DWORD*);
898 BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR,DWORD*);
899 #define PathFileExistsAndAttributes WINELIB_NAME_AW(PathFileExistsAndAttributes)
900
901 LPSTR WINAPI PathFindExtensionA(_In_ LPCSTR);
902 LPWSTR WINAPI PathFindExtensionW(_In_ LPCWSTR);
903 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
904
905 LPSTR WINAPI PathFindFileNameA(_In_ LPCSTR);
906 LPWSTR WINAPI PathFindFileNameW(_In_ LPCWSTR);
907 #define PathFindFileName WINELIB_NAME_AW(PathFindFileName)
908
909 LPSTR WINAPI PathFindNextComponentA(_In_ LPCSTR);
910 LPWSTR WINAPI PathFindNextComponentW(_In_ LPCWSTR);
911 #define PathFindNextComponent WINELIB_NAME_AW(PathFindNextComponent)
912
913 BOOL WINAPI PathFindOnPathA(_Inout_updates_(MAX_PATH) LPSTR, _In_opt_ LPCSTR*);
914 BOOL WINAPI PathFindOnPathW(_Inout_updates_(MAX_PATH) LPWSTR, _In_opt_ LPCWSTR*);
915 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
916
917 LPSTR WINAPI PathGetArgsA(_In_ LPCSTR);
918 LPWSTR WINAPI PathGetArgsW(_In_ LPCWSTR);
919 #define PathGetArgs WINELIB_NAME_AW(PathGetArgs)
920
921 UINT WINAPI PathGetCharTypeA(_In_ UCHAR);
922 UINT WINAPI PathGetCharTypeW(_In_ WCHAR);
923 #define PathGetCharType WINELIB_NAME_AW(PathGetCharType)
924
925 int WINAPI PathGetDriveNumberA(_In_ LPCSTR);
926 int WINAPI PathGetDriveNumberW(_In_ LPCWSTR);
927 #define PathGetDriveNumber WINELIB_NAME_AW(PathGetDriveNumber)
928
929 BOOL WINAPI PathIsDirectoryA(_In_ LPCSTR);
930 BOOL WINAPI PathIsDirectoryW(_In_ LPCWSTR);
931 #define PathIsDirectory WINELIB_NAME_AW(PathIsDirectory)
932
933 BOOL WINAPI PathIsDirectoryEmptyA(_In_ LPCSTR);
934 BOOL WINAPI PathIsDirectoryEmptyW(_In_ LPCWSTR);
935 #define PathIsDirectoryEmpty WINELIB_NAME_AW(PathIsDirectoryEmpty)
936
937 BOOL WINAPI PathIsFileSpecA(_In_ LPCSTR);
938 BOOL WINAPI PathIsFileSpecW(_In_ LPCWSTR);
939 #define PathIsFileSpec WINELIB_NAME_AW(PathIsFileSpec);
940
941 BOOL WINAPI PathIsPrefixA(_In_ LPCSTR, _In_ LPCSTR);
942 BOOL WINAPI PathIsPrefixW(_In_ LPCWSTR, _In_ LPCWSTR);
943 #define PathIsPrefix WINELIB_NAME_AW(PathIsPrefix)
944
945 BOOL WINAPI PathIsRelativeA(_In_ LPCSTR);
946 BOOL WINAPI PathIsRelativeW(_In_ LPCWSTR);
947 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
948
949 BOOL WINAPI PathIsRootA(_In_ LPCSTR);
950 BOOL WINAPI PathIsRootW(_In_ LPCWSTR);
951 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
952
953 BOOL WINAPI PathIsSameRootA(_In_ LPCSTR, _In_ LPCSTR);
954 BOOL WINAPI PathIsSameRootW(_In_ LPCWSTR, _In_ LPCWSTR);
955 #define PathIsSameRoot WINELIB_NAME_AW(PathIsSameRoot)
956
957 BOOL WINAPI PathIsUNCA(_In_ LPCSTR);
958 BOOL WINAPI PathIsUNCW(_In_ LPCWSTR);
959 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
960
961 BOOL WINAPI PathIsUNCServerA(_In_ LPCSTR);
962 BOOL WINAPI PathIsUNCServerW(_In_ LPCWSTR);
963 #define PathIsUNCServer WINELIB_NAME_AW(PathIsUNCServer)
964
965 BOOL WINAPI PathIsUNCServerShareA(_In_ LPCSTR);
966 BOOL WINAPI PathIsUNCServerShareW(_In_ LPCWSTR);
967 #define PathIsUNCServerShare WINELIB_NAME_AW(PathIsUNCServerShare)
968
969 BOOL WINAPI PathIsContentTypeA(_In_ LPCSTR, _In_ LPCSTR);
970 BOOL WINAPI PathIsContentTypeW(_In_ LPCWSTR, _In_ LPCWSTR);
971 #define PathIsContentType WINELIB_NAME_AW(PathIsContentType)
972
973 BOOL WINAPI PathIsURLA(_In_ LPCSTR);
974 BOOL WINAPI PathIsURLW(_In_ LPCWSTR);
975 #define PathIsURL WINELIB_NAME_AW(PathIsURL)
976
977 BOOL WINAPI PathMakePrettyA(_Inout_ LPSTR);
978 BOOL WINAPI PathMakePrettyW(_Inout_ LPWSTR);
979 #define PathMakePretty WINELIB_NAME_AW(PathMakePretty)
980
981 BOOL WINAPI PathMatchSpecA(_In_ LPCSTR, _In_ LPCSTR);
982 BOOL WINAPI PathMatchSpecW(_In_ LPCWSTR, _In_ LPCWSTR);
983 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
984
985 int WINAPI PathParseIconLocationA(_Inout_ LPSTR);
986 int WINAPI PathParseIconLocationW(_Inout_ LPWSTR);
987 #define PathParseIconLocation WINELIB_NAME_AW(PathParseIconLocation)
988
989 VOID WINAPI PathQuoteSpacesA(_Inout_updates_(MAX_PATH) LPSTR);
990 VOID WINAPI PathQuoteSpacesW(_Inout_updates_(MAX_PATH) LPWSTR);
991 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
992
993 BOOL
994 WINAPI
995 PathRelativePathToA(
996 _Out_writes_(MAX_PATH) LPSTR,
997 _In_ LPCSTR,
998 _In_ DWORD,
999 _In_ LPCSTR,
1000 _In_ DWORD);
1001
1002 BOOL
1003 WINAPI
1004 PathRelativePathToW(
1005 _Out_writes_(MAX_PATH) LPWSTR,
1006 _In_ LPCWSTR,
1007 _In_ DWORD,
1008 _In_ LPCWSTR,
1009 _In_ DWORD);
1010
1011 #define PathRelativePathTo WINELIB_NAME_AW(PathRelativePathTo)
1012
1013 VOID WINAPI PathRemoveArgsA(_Inout_ LPSTR);
1014 VOID WINAPI PathRemoveArgsW(_Inout_ LPWSTR);
1015 #define PathRemoveArgs WINELIB_NAME_AW(PathRemoveArgs)
1016
1017 LPSTR WINAPI PathRemoveBackslashA(_Inout_ LPSTR);
1018 LPWSTR WINAPI PathRemoveBackslashW(_Inout_ LPWSTR);
1019 #define PathRemoveBackslash WINELIB_NAME_AW(PathRemoveBackslash)
1020
1021 VOID WINAPI PathRemoveBlanksA(_Inout_ LPSTR);
1022 VOID WINAPI PathRemoveBlanksW(_Inout_ LPWSTR);
1023 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
1024
1025 VOID WINAPI PathRemoveExtensionA(_Inout_ LPSTR);
1026 VOID WINAPI PathRemoveExtensionW(_Inout_ LPWSTR);
1027 #define PathRemoveExtension WINELIB_NAME_AW(PathRemoveExtension)
1028
1029 BOOL WINAPI PathRemoveFileSpecA(_Inout_ LPSTR);
1030 BOOL WINAPI PathRemoveFileSpecW(_Inout_ LPWSTR);
1031 #define PathRemoveFileSpec WINELIB_NAME_AW(PathRemoveFileSpec)
1032
1033 BOOL
1034 WINAPI
1035 PathRenameExtensionA(
1036 _Inout_updates_(MAX_PATH) LPSTR,
1037 _In_ LPCSTR);
1038
1039 BOOL
1040 WINAPI
1041 PathRenameExtensionW(
1042 _Inout_updates_(MAX_PATH) LPWSTR,
1043 _In_ LPCWSTR);
1044
1045 #define PathRenameExtension WINELIB_NAME_AW(PathRenameExtension)
1046
1047 BOOL
1048 WINAPI
1049 PathSearchAndQualifyA(
1050 _In_ LPCSTR,
1051 _Out_writes_(cchBuf) LPSTR,
1052 _In_ UINT cchBuf);
1053
1054 BOOL
1055 WINAPI
1056 PathSearchAndQualifyW(
1057 _In_ LPCWSTR,
1058 _Out_writes_(cchBuf) LPWSTR,
1059 _In_ UINT cchBuf);
1060
1061 #define PathSearchAndQualify WINELIB_NAME_AW(PathSearchAndQualify)
1062
1063 VOID WINAPI PathSetDlgItemPathA(_In_ HWND, int, LPCSTR);
1064 VOID WINAPI PathSetDlgItemPathW(_In_ HWND, int, LPCWSTR);
1065 #define PathSetDlgItemPath WINELIB_NAME_AW(PathSetDlgItemPath)
1066
1067 LPSTR WINAPI PathSkipRootA(_In_ LPCSTR);
1068 LPWSTR WINAPI PathSkipRootW(_In_ LPCWSTR);
1069 #define PathSkipRoot WINELIB_NAME_AW(PathSkipRoot)
1070
1071 VOID WINAPI PathStripPathA(_Inout_ LPSTR);
1072 VOID WINAPI PathStripPathW(_Inout_ LPWSTR);
1073 #define PathStripPath WINELIB_NAME_AW(PathStripPath)
1074
1075 BOOL WINAPI PathStripToRootA(_Inout_ LPSTR);
1076 BOOL WINAPI PathStripToRootW(_Inout_ LPWSTR);
1077 #define PathStripToRoot WINELIB_NAME_AW(PathStripToRoot)
1078
1079 VOID WINAPI PathUnquoteSpacesA(_Inout_ LPSTR);
1080 VOID WINAPI PathUnquoteSpacesW(_Inout_ LPWSTR);
1081 #define PathUnquoteSpaces WINELIB_NAME_AW(PathUnquoteSpaces)
1082
1083 BOOL WINAPI PathMakeSystemFolderA(_In_ LPCSTR);
1084 BOOL WINAPI PathMakeSystemFolderW(_In_ LPCWSTR);
1085 #define PathMakeSystemFolder WINELIB_NAME_AW(PathMakeSystemFolder)
1086
1087 BOOL WINAPI PathUnmakeSystemFolderA(_In_ LPCSTR);
1088 BOOL WINAPI PathUnmakeSystemFolderW(_In_ LPCWSTR);
1089 #define PathUnmakeSystemFolder WINELIB_NAME_AW(PathUnmakeSystemFolder)
1090
1091 BOOL WINAPI PathIsSystemFolderA(_In_opt_ LPCSTR, _In_ DWORD);
1092 BOOL WINAPI PathIsSystemFolderW(_In_opt_ LPCWSTR, _In_ DWORD);
1093 #define PathIsSystemFolder WINELIB_NAME_AW(PathIsSystemFolder)
1094
1095 BOOL WINAPI PathIsNetworkPathA(_In_ LPCSTR);
1096 BOOL WINAPI PathIsNetworkPathW(_In_ LPCWSTR);
1097 #define PathIsNetworkPath WINELIB_NAME_AW(PathIsNetworkPath)
1098
1099 BOOL WINAPI PathIsLFNFileSpecA(_In_ LPCSTR);
1100 BOOL WINAPI PathIsLFNFileSpecW(_In_ LPCWSTR);
1101 #define PathIsLFNFileSpec WINELIB_NAME_AW(PathIsLFNFileSpec)
1102
1103 LPCSTR
1104 WINAPI
1105 PathFindSuffixArrayA(
1106 _In_ LPCSTR,
1107 _In_reads_(iArraySize) LPCSTR *,
1108 int iArraySize);
1109
1110 LPCWSTR
1111 WINAPI
1112 PathFindSuffixArrayW(
1113 _In_ LPCWSTR,
1114 _In_reads_(iArraySize) LPCWSTR *,
1115 int iArraySize);
1116
1117 #define PathFindSuffixArray WINELIB_NAME_AW(PathFindSuffixArray)
1118
1119 VOID WINAPI PathUndecorateA(_Inout_ LPSTR);
1120 VOID WINAPI PathUndecorateW(_Inout_ LPWSTR);
1121 #define PathUndecorate WINELIB_NAME_AW(PathUndecorate)
1122
1123 BOOL
1124 WINAPI
1125 PathUnExpandEnvStringsA(
1126 _In_ LPCSTR,
1127 _Out_writes_(cchBuf) LPSTR,
1128 _In_ UINT cchBuf);
1129
1130 BOOL
1131 WINAPI
1132 PathUnExpandEnvStringsW(
1133 _In_ LPCWSTR,
1134 _Out_writes_(cchBuf) LPWSTR,
1135 _In_ UINT cchBuf);
1136
1137 #define PathUnExpandEnvStrings WINELIB_NAME_AW(PathUnExpandEnvStrings)
1138
1139 /* Url functions */
1140 typedef enum {
1141 URL_SCHEME_INVALID = -1,
1142 URL_SCHEME_UNKNOWN = 0,
1143 URL_SCHEME_FTP,
1144 URL_SCHEME_HTTP,
1145 URL_SCHEME_GOPHER,
1146 URL_SCHEME_MAILTO,
1147 URL_SCHEME_NEWS,
1148 URL_SCHEME_NNTP,
1149 URL_SCHEME_TELNET,
1150 URL_SCHEME_WAIS,
1151 URL_SCHEME_FILE,
1152 URL_SCHEME_MK,
1153 URL_SCHEME_HTTPS,
1154 URL_SCHEME_SHELL,
1155 URL_SCHEME_SNEWS,
1156 URL_SCHEME_LOCAL,
1157 URL_SCHEME_JAVASCRIPT,
1158 URL_SCHEME_VBSCRIPT,
1159 URL_SCHEME_ABOUT,
1160 URL_SCHEME_RES,
1161 URL_SCHEME_MSSHELLROOTED,
1162 URL_SCHEME_MSSHELLIDLIST,
1163 URL_SCHEME_MSHELP,
1164 URL_SCHEME_MSSHELLDEVICE,
1165 URL_SCHEME_WILDCARD,
1166 URL_SCHEME_SEARCH_MS,
1167 URL_SCHEME_SEARCH,
1168 URL_SCHEME_KNOWNFOLDER,
1169 URL_SCHEME_MAXVALUE
1170 } URL_SCHEME;
1171
1172 /* These are used by UrlGetPart routine */
1173 typedef enum {
1174 URL_PART_NONE = 0,
1175 URL_PART_SCHEME = 1,
1176 URL_PART_HOSTNAME,
1177 URL_PART_USERNAME,
1178 URL_PART_PASSWORD,
1179 URL_PART_PORT,
1180 URL_PART_QUERY
1181 } URL_PART;
1182
1183 #define URL_PARTFLAG_KEEPSCHEME 0x00000001
1184
1185 /* These are used by the UrlIs... routines */
1186 typedef enum {
1187 URLIS_URL,
1188 URLIS_OPAQUE,
1189 URLIS_NOHISTORY,
1190 URLIS_FILEURL,
1191 URLIS_APPLIABLE,
1192 URLIS_DIRECTORY,
1193 URLIS_HASQUERY
1194 } URLIS;
1195
1196 /* This is used by the UrlApplyScheme... routines */
1197 #define URL_APPLY_FORCEAPPLY 0x00000008
1198 #define URL_APPLY_GUESSFILE 0x00000004
1199 #define URL_APPLY_GUESSSCHEME 0x00000002
1200 #define URL_APPLY_DEFAULT 0x00000001
1201
1202 /* The following are used by UrlEscape..., UrlUnEscape...,
1203 * UrlCanonicalize..., and UrlCombine... routines
1204 */
1205 #define URL_WININET_COMPATIBILITY 0x80000000
1206 #define URL_PLUGGABLE_PROTOCOL 0x40000000
1207 #define URL_ESCAPE_UNSAFE 0x20000000
1208 #define URL_UNESCAPE 0x10000000
1209
1210 #define URL_DONT_SIMPLIFY 0x08000000
1211 #define URL_NO_META URL_DONT_SIMPLIFY
1212 #define URL_ESCAPE_SPACES_ONLY 0x04000000
1213 #define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
1214 #define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
1215 #define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO
1216
1217 #define URL_INTERNAL_PATH 0x00800000 /* Will escape #'s in paths */
1218 #define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
1219 #define URL_CONVERT_IF_DOSPATH 0x00200000
1220 #define URL_UNESCAPE_INPLACE 0x00100000
1221
1222 #define URL_FILE_USE_PATHURL 0x00010000
1223
1224 #define URL_ESCAPE_SEGMENT_ONLY 0x00002000
1225 #define URL_ESCAPE_PERCENT 0x00001000
1226
1227 HRESULT
1228 WINAPI
1229 UrlApplySchemeA(
1230 _In_ LPCSTR,
1231 _Out_writes_(*pcchOut) LPSTR,
1232 _Inout_ LPDWORD pcchOut,
1233 DWORD);
1234
1235 HRESULT
1236 WINAPI
1237 UrlApplySchemeW(
1238 _In_ LPCWSTR,
1239 _Out_writes_(*pcchOut) LPWSTR,
1240 _Inout_ LPDWORD pcchOut,
1241 DWORD);
1242
1243 #define UrlApplyScheme WINELIB_NAME_AW(UrlApplyScheme)
1244
1245 HRESULT
1246 WINAPI
1247 UrlCanonicalizeA(
1248 _In_ LPCSTR,
1249 _Out_writes_to_(*pcchCanonicalized, *pcchCanonicalized) LPSTR,
1250 _Inout_ LPDWORD pcchCanonicalized,
1251 DWORD);
1252
1253 HRESULT
1254 WINAPI
1255 UrlCanonicalizeW(
1256 _In_ LPCWSTR,
1257 _Out_writes_to_(*pcchCanonicalized, *pcchCanonicalized) LPWSTR,
1258 _Inout_ LPDWORD pcchCanonicalized,
1259 DWORD);
1260
1261 #define UrlCanonicalize WINELIB_NAME_AW(UrlCanonicalize)
1262
1263 HRESULT
1264 WINAPI
1265 UrlCombineA(
1266 _In_ LPCSTR,
1267 _In_ LPCSTR,
1268 _Out_writes_to_opt_(*pcchCombined, *pcchCombined) LPSTR,
1269 _Inout_ LPDWORD pcchCombined,
1270 DWORD);
1271
1272 HRESULT
1273 WINAPI
1274 UrlCombineW(
1275 _In_ LPCWSTR,
1276 _In_ LPCWSTR,
1277 _Out_writes_to_opt_(*pcchCombined, *pcchCombined) LPWSTR,
1278 _Inout_ LPDWORD pcchCombined,
1279 DWORD);
1280
1281 #define UrlCombine WINELIB_NAME_AW(UrlCombine)
1282
1283 INT WINAPI UrlCompareA(_In_ LPCSTR, _In_ LPCSTR, BOOL);
1284 INT WINAPI UrlCompareW(_In_ LPCWSTR, _In_ LPCWSTR, BOOL);
1285 #define UrlCompare WINELIB_NAME_AW(UrlCompare)
1286
1287 HRESULT
1288 WINAPI
1289 UrlEscapeA(
1290 _In_ LPCSTR,
1291 _Out_writes_to_(*pcchEscaped, *pcchEscaped) LPSTR,
1292 _Inout_ LPDWORD pcchEscaped,
1293 DWORD);
1294
1295 HRESULT
1296 WINAPI
1297 UrlEscapeW(
1298 _In_ LPCWSTR,
1299 _Out_writes_to_(*pcchEscaped, *pcchEscaped) LPWSTR,
1300 _Inout_ LPDWORD pcchEscaped,
1301 DWORD);
1302
1303 #define UrlEscape WINELIB_NAME_AW(UrlEscape)
1304
1305 #define UrlEscapeSpacesA(x,y,z) UrlCanonicalizeA(x, y, z, \
1306 URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY)
1307 #define UrlEscapeSpacesW(x,y,z) UrlCanonicalizeW(x, y, z, \
1308 URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY)
1309 #define UrlEscapeSpaces WINELIB_NAME_AW(UrlEscapeSpaces)
1310
1311 LPCSTR WINAPI UrlGetLocationA(_In_ LPCSTR);
1312 LPCWSTR WINAPI UrlGetLocationW(_In_ LPCWSTR);
1313 #define UrlGetLocation WINELIB_NAME_AW(UrlGetLocation)
1314
1315 HRESULT
1316 WINAPI
1317 UrlGetPartA(
1318 _In_ LPCSTR,
1319 _Out_writes_(*pcchOut) LPSTR,
1320 _Inout_ LPDWORD pcchOut,
1321 DWORD,
1322 DWORD);
1323
1324 HRESULT
1325 WINAPI
1326 UrlGetPartW(
1327 _In_ LPCWSTR,
1328 _Out_writes_(*pcchOut) LPWSTR,
1329 _Inout_ LPDWORD pcchOut,
1330 DWORD,
1331 DWORD);
1332
1333 #define UrlGetPart WINELIB_NAME_AW(UrlGetPart)
1334
1335 HRESULT
1336 WINAPI
1337 HashData(
1338 _In_reads_bytes_(cbData) const unsigned char *,
1339 DWORD cbData,
1340 _Out_writes_bytes_(cbHash) unsigned char *lpDest,
1341 DWORD cbHash);
1342
1343 HRESULT
1344 WINAPI
1345 UrlHashA(
1346 _In_ LPCSTR,
1347 _Out_writes_bytes_(cbHash) unsigned char *,
1348 DWORD cbHash);
1349
1350 HRESULT
1351 WINAPI
1352 UrlHashW(
1353 _In_ LPCWSTR,
1354 _Out_writes_bytes_(cbHash) unsigned char *,
1355 DWORD cbHash);
1356
1357 #define UrlHash WINELIB_NAME_AW(UrlHash)
1358
1359 BOOL WINAPI UrlIsA(_In_ LPCSTR, URLIS);
1360 BOOL WINAPI UrlIsW(_In_ LPCWSTR, URLIS);
1361 #define UrlIs WINELIB_NAME_AW(UrlIs)
1362
1363 BOOL WINAPI UrlIsNoHistoryA(_In_ LPCSTR);
1364 BOOL WINAPI UrlIsNoHistoryW(_In_ LPCWSTR);
1365 #define UrlIsNoHistory WINELIB_NAME_AW(UrlIsNoHistory)
1366
1367 BOOL WINAPI UrlIsOpaqueA(_In_ LPCSTR);
1368 BOOL WINAPI UrlIsOpaqueW(_In_ LPCWSTR);
1369 #define UrlIsOpaque WINELIB_NAME_AW(UrlIsOpaque)
1370
1371 #define UrlIsFileUrlA(x) UrlIsA(x, URLIS_FILEURL)
1372 #define UrlIsFileUrlW(x) UrlIsW(x, URLIS_FILEURL)
1373 #define UrlIsFileUrl WINELIB_NAME_AW(UrlIsFileUrl)
1374
1375 HRESULT
1376 WINAPI
1377 UrlUnescapeA(
1378 _Inout_ LPSTR,
1379 _Out_writes_to_opt_(*pcchUnescaped, *pcchUnescaped) LPSTR,
1380 _Inout_opt_ LPDWORD pcchUnescaped,
1381 DWORD);
1382
1383 HRESULT
1384 WINAPI
1385 UrlUnescapeW(
1386 _Inout_ LPWSTR,
1387 _Out_writes_to_opt_(*pcchUnescaped, *pcchUnescaped) LPWSTR,
1388 _Inout_opt_ LPDWORD pcchUnescaped,
1389 DWORD);
1390
1391 #define UrlUnescape WINELIB_NAME_AW(UrlUnescape)
1392
1393 #define UrlUnescapeInPlaceA(x,y) UrlUnescapeA(x, NULL, NULL, \
1394 y | URL_UNESCAPE_INPLACE)
1395 #define UrlUnescapeInPlaceW(x,y) UrlUnescapeW(x, NULL, NULL, \
1396 y | URL_UNESCAPE_INPLACE)
1397 #define UrlUnescapeInPlace WINELIB_NAME_AW(UrlUnescapeInPlace)
1398
1399 HRESULT
1400 WINAPI
1401 UrlCreateFromPathA(
1402 _In_ LPCSTR,
1403 _Out_writes_to_(*pcchUrl, *pcchUrl) LPSTR,
1404 _Inout_ LPDWORD pcchUrl,
1405 DWORD);
1406
1407 HRESULT
1408 WINAPI
1409 UrlCreateFromPathW(
1410 _In_ LPCWSTR,
1411 _Out_writes_to_(*pcchUrl, *pcchUrl) LPWSTR,
1412 _Inout_ LPDWORD pcchUrl,
1413 DWORD);
1414
1415 #define UrlCreateFromPath WINELIB_NAME_AW(UrlCreateFromPath)
1416
1417 typedef struct tagPARSEDURLA {
1418 DWORD cbSize;
1419 LPCSTR pszProtocol;
1420 UINT cchProtocol;
1421 LPCSTR pszSuffix;
1422 UINT cchSuffix;
1423 UINT nScheme;
1424 } PARSEDURLA, *PPARSEDURLA;
1425
1426 typedef struct tagPARSEDURLW {
1427 DWORD cbSize;
1428 LPCWSTR pszProtocol;
1429 UINT cchProtocol;
1430 LPCWSTR pszSuffix;
1431 UINT cchSuffix;
1432 UINT nScheme;
1433 } PARSEDURLW, *PPARSEDURLW;
1434
1435 HRESULT WINAPI ParseURLA(_In_ LPCSTR pszUrl, _Inout_ PARSEDURLA *ppu);
1436 HRESULT WINAPI ParseURLW(_In_ LPCWSTR pszUrl, _Inout_ PARSEDURLW *ppu);
1437 #define ParseURL WINELIB_NAME_AW(ParseUrl)
1438
1439 #endif /* NO_SHLWAPI_PATH */
1440
1441
1442 /* String functions */
1443 #ifndef NO_SHLWAPI_STRFCNS
1444
1445 /* StrToIntEx flags */
1446 #define STIF_DEFAULT 0x0L
1447 #define STIF_SUPPORT_HEX 0x1L
1448
1449 BOOL WINAPI ChrCmpIA (WORD,WORD);
1450 BOOL WINAPI ChrCmpIW (WCHAR,WCHAR);
1451 #define ChrCmpI WINELIB_NAME_AW(ChrCmpI)
1452
1453 INT WINAPI StrCSpnA(_In_ LPCSTR, _In_ LPCSTR);
1454 INT WINAPI StrCSpnW(_In_ LPCWSTR, _In_ LPCWSTR);
1455 #define StrCSpn WINELIB_NAME_AW(StrCSpn)
1456
1457 INT WINAPI StrCSpnIA(_In_ LPCSTR, _In_ LPCSTR);
1458 INT WINAPI StrCSpnIW(_In_ LPCWSTR, _In_ LPCWSTR);
1459 #define StrCSpnI WINELIB_NAME_AW(StrCSpnI)
1460
1461 #define StrCatA lstrcatA
1462 LPWSTR WINAPI StrCatW(_Inout_ LPWSTR, _In_ LPCWSTR);
1463 #define StrCat WINELIB_NAME_AW(StrCat)
1464
1465 LPSTR
1466 WINAPI
1467 StrCatBuffA(
1468 _Inout_updates_(cchDestBuffSize) LPSTR,
1469 _In_ LPCSTR,
1470 INT cchDestBuffSize);
1471
1472 LPWSTR
1473 WINAPI
1474 StrCatBuffW(
1475 _Inout_updates_(cchDestBuffSize) LPWSTR,
1476 _In_ LPCWSTR,
1477 INT cchDestBuffSize);
1478
1479 #define StrCatBuff WINELIB_NAME_AW(StrCatBuff)
1480
1481 DWORD
1482 WINAPI
1483 StrCatChainW(
1484 _Out_writes_(cchDst) LPWSTR,
1485 DWORD cchDst,
1486 DWORD,
1487 _In_ LPCWSTR);
1488
1489 LPSTR WINAPI StrChrA(_In_ LPCSTR, WORD);
1490 LPWSTR WINAPI StrChrW(_In_ LPCWSTR, WCHAR);
1491 #define StrChr WINELIB_NAME_AW(StrChr)
1492
1493 LPSTR WINAPI StrChrIA(_In_ LPCSTR, WORD);
1494 LPWSTR WINAPI StrChrIW(_In_ LPCWSTR, WCHAR);
1495 #define StrChrI WINELIB_NAME_AW(StrChrI)
1496
1497 #define StrCmpA lstrcmpA
1498 int WINAPI StrCmpW(_In_ LPCWSTR, _In_ LPCWSTR);
1499 #define StrCmp WINELIB_NAME_AW(StrCmp)
1500
1501 #define StrCmpIA lstrcmpiA
1502 int WINAPI StrCmpIW(_In_ LPCWSTR, _In_ LPCWSTR);
1503 #define StrCmpI WINELIB_NAME_AW(StrCmpI)
1504
1505 #define StrCpyA lstrcpyA
1506 LPWSTR WINAPI StrCpyW(_Out_ LPWSTR, _In_ LPCWSTR);
1507 #define StrCpy WINELIB_NAME_AW(StrCpy)
1508
1509 #define StrCpyNA lstrcpynA
1510 LPWSTR WINAPI StrCpyNW(_Out_writes_(cchMax) LPWSTR, _In_ LPCWSTR, int cchMax);
1511 #define StrCpyN WINELIB_NAME_AW(StrCpyN)
1512 #define StrNCpy WINELIB_NAME_AW(StrCpyN)
1513
1514 INT WINAPI StrCmpLogicalW(_In_ LPCWSTR, _In_ LPCWSTR);
1515
1516 INT WINAPI StrCmpNA(_In_ LPCSTR, _In_ LPCSTR, INT);
1517 INT WINAPI StrCmpNW(_In_ LPCWSTR, _In_ LPCWSTR, INT);
1518 #define StrCmpN WINELIB_NAME_AW(StrCmpN)
1519 #define StrNCmp WINELIB_NAME_AW(StrCmpN)
1520
1521 INT WINAPI StrCmpNIA(_In_ LPCSTR, _In_ LPCSTR, INT);
1522 INT WINAPI StrCmpNIW(_In_ LPCWSTR, _In_ LPCWSTR, INT);
1523 #define StrCmpNI WINELIB_NAME_AW(StrCmpNI)
1524 #define StrNCmpI WINELIB_NAME_AW(StrCmpNI)
1525
1526 LPSTR WINAPI StrDupA(_In_ LPCSTR);
1527 LPWSTR WINAPI StrDupW(_In_ LPCWSTR);
1528 #define StrDup WINELIB_NAME_AW(StrDup)
1529
1530 HRESULT WINAPI SHStrDupA(_In_ LPCSTR, _Outptr_ WCHAR**);
1531 HRESULT WINAPI SHStrDupW(_In_ LPCWSTR, _Outptr_ WCHAR**);
1532 #define SHStrDup WINELIB_NAME_AW(SHStrDup)
1533
1534 LPSTR
1535 WINAPI
1536 StrFormatByteSizeA(
1537 DWORD,
1538 _Out_writes_(cchBuf) LPSTR,
1539 UINT cchBuf);
1540
1541 /* A/W Pairing is broken for this function */
1542
1543 LPSTR
1544 WINAPI
1545 StrFormatByteSize64A(
1546 LONGLONG,
1547 _Out_writes_(cchBuf) LPSTR,
1548 UINT cchBuf);
1549
1550 LPWSTR
1551 WINAPI
1552 StrFormatByteSizeW(
1553 LONGLONG,
1554 _Out_writes_(cchBuf) LPWSTR,
1555 UINT cchBuf);
1556
1557 #ifndef WINE_NO_UNICODE_MACROS
1558 #ifdef UNICODE
1559 #define StrFormatByteSize StrFormatByteSizeW
1560 #else
1561 #define StrFormatByteSize StrFormatByteSize64A
1562 #endif
1563 #endif
1564
1565 LPSTR
1566 WINAPI
1567 StrFormatKBSizeA(
1568 LONGLONG,
1569 _Out_writes_(cchBuf) LPSTR,
1570 UINT cchBuf);
1571
1572 LPWSTR
1573 WINAPI
1574 StrFormatKBSizeW(
1575 LONGLONG,
1576 _Out_writes_(cchBuf) LPWSTR,
1577 UINT cchBuf);
1578
1579 #define StrFormatKBSize WINELIB_NAME_AW(StrFormatKBSize)
1580
1581 int
1582 WINAPI
1583 StrFromTimeIntervalA(
1584 _Out_writes_(cchMax) LPSTR,
1585 UINT cchMax,
1586 DWORD,
1587 int);
1588
1589 int
1590 WINAPI
1591 StrFromTimeIntervalW(
1592 _Out_writes_(cchMax) LPWSTR,
1593 UINT cchMax,
1594 DWORD,
1595 int);
1596
1597 #define StrFromTimeInterval WINELIB_NAME_AW(StrFromTimeInterval)
1598
1599 BOOL WINAPI StrIsIntlEqualA(BOOL, _In_ LPCSTR, _In_ LPCSTR, int);
1600 BOOL WINAPI StrIsIntlEqualW(BOOL, _In_ LPCWSTR, _In_ LPCWSTR, int);
1601 #define StrIsIntlEqual WINELIB_NAME_AW(StrIsIntlEqual)
1602
1603 #define StrIntlEqNA(a,b,c) StrIsIntlEqualA(TRUE,a,b,c)
1604 #define StrIntlEqNW(a,b,c) StrIsIntlEqualW(TRUE,a,b,c)
1605
1606 #define StrIntlEqNIA(a,b,c) StrIsIntlEqualA(FALSE,a,b,c)
1607 #define StrIntlEqNIW(a,b,c) StrIsIntlEqualW(FALSE,a,b,c)
1608
1609 LPSTR WINAPI StrNCatA(_Inout_updates_(cchMax) LPSTR, LPCSTR, int cchMax);
1610 LPWSTR WINAPI StrNCatW(_Inout_updates_(cchMax) LPWSTR, LPCWSTR, int cchMax);
1611 #define StrNCat WINELIB_NAME_AW(StrNCat)
1612 #define StrCatN WINELIB_NAME_AW(StrNCat)
1613
1614 LPSTR WINAPI StrPBrkA(_In_ LPCSTR, _In_ LPCSTR);
1615 LPWSTR WINAPI StrPBrkW(_In_ LPCWSTR, _In_ LPCWSTR);
1616 #define StrPBrk WINELIB_NAME_AW(StrPBrk)
1617
1618 LPSTR WINAPI StrRChrA(_In_ LPCSTR, _In_opt_ LPCSTR, WORD);
1619 LPWSTR WINAPI StrRChrW(_In_ LPCWSTR, _In_opt_ LPCWSTR, WCHAR);
1620 #define StrRChr WINELIB_NAME_AW(StrRChr)
1621
1622 LPSTR WINAPI StrRChrIA(_In_ LPCSTR, _In_opt_ LPCSTR, WORD);
1623 LPWSTR WINAPI StrRChrIW(_In_ LPCWSTR, _In_opt_ LPCWSTR, WCHAR);
1624 #define StrRChrI WINELIB_NAME_AW(StrRChrI)
1625
1626 LPSTR WINAPI StrRStrIA(_In_ LPCSTR, _In_opt_ LPCSTR, _In_ LPCSTR);
1627 LPWSTR WINAPI StrRStrIW(_In_ LPCWSTR, _In_opt_ LPCWSTR, _In_ LPCWSTR);
1628 #define StrRStrI WINELIB_NAME_AW(StrRStrI)
1629
1630 int WINAPI StrSpnA(_In_ LPCSTR, _In_ LPCSTR);
1631 int WINAPI StrSpnW(_In_ LPCWSTR, _In_ LPCWSTR);
1632 #define StrSpn WINELIB_NAME_AW(StrSpn)
1633
1634 LPSTR WINAPI StrStrA(_In_ LPCSTR, _In_ LPCSTR);
1635 LPWSTR WINAPI StrStrW(_In_ LPCWSTR, _In_ LPCWSTR);
1636 #define StrStr WINELIB_NAME_AW(StrStr)
1637
1638 LPSTR WINAPI StrStrIA(_In_ LPCSTR, _In_ LPCSTR);
1639 LPWSTR WINAPI StrStrIW(_In_ LPCWSTR, _In_ LPCWSTR);
1640 #define StrStrI WINELIB_NAME_AW(StrStrI)
1641
1642 LPWSTR WINAPI StrStrNW(_In_ LPCWSTR, _In_ LPCWSTR, UINT);
1643 LPWSTR WINAPI StrStrNIW(_In_ LPCWSTR, _In_ LPCWSTR, UINT);
1644
1645 int WINAPI StrToIntA(_In_ LPCSTR);
1646 int WINAPI StrToIntW(_In_ LPCWSTR);
1647 #define StrToInt WINELIB_NAME_AW(StrToInt)
1648 #define StrToLong WINELIB_NAME_AW(StrToInt)
1649
1650 BOOL WINAPI StrToIntExA(_In_ LPCSTR, DWORD, _Out_ int*);
1651 BOOL WINAPI StrToIntExW(_In_ LPCWSTR, DWORD, _Out_ int*);
1652 #define StrToIntEx WINELIB_NAME_AW(StrToIntEx)
1653
1654 BOOL WINAPI StrToInt64ExA(_In_ LPCSTR, DWORD, _Out_ LONGLONG*);
1655 BOOL WINAPI StrToInt64ExW(_In_ LPCWSTR, DWORD, _Out_ LONGLONG*);
1656 #define StrToIntEx64 WINELIB_NAME_AW(StrToIntEx64)
1657
1658 BOOL WINAPI StrTrimA(_Inout_ LPSTR, _In_ LPCSTR);
1659 BOOL WINAPI StrTrimW(_Inout_ LPWSTR, _In_ LPCWSTR);
1660 #define StrTrim WINELIB_NAME_AW(StrTrim)
1661
1662 INT
1663 WINAPI
1664 wvnsprintfA(
1665 _Out_writes_(cchDest) LPSTR,
1666 _In_ INT cchDest,
1667 _In_ _Printf_format_string_ LPCSTR,
1668 _In_ __ms_va_list);
1669
1670 INT
1671 WINAPI
1672 wvnsprintfW(
1673 _Out_writes_(cchDest) LPWSTR,
1674 _In_ INT cchDest,
1675 _In_ _Printf_format_string_ LPCWSTR,
1676 _In_ __ms_va_list);
1677
1678 #define wvnsprintf WINELIB_NAME_AW(wvnsprintf)
1679
1680 INT
1681 WINAPIV
1682 wnsprintfA(
1683 _Out_writes_(cchDest) LPSTR,
1684 _In_ INT cchDest,
1685 _In_ _Printf_format_string_ LPCSTR,
1686 ...);
1687
1688 INT
1689 WINAPIV
1690 wnsprintfW(
1691 _Out_writes_(cchDest) LPWSTR,
1692 _In_ INT cchDest,
1693 _In_ _Printf_format_string_ LPCWSTR,
1694 ...);
1695
1696 #define wnsprintf WINELIB_NAME_AW(wnsprintf)
1697
1698 HRESULT
1699 WINAPI
1700 SHLoadIndirectString(
1701 _In_ LPCWSTR,
1702 _Out_writes_(cchOutBuf) LPWSTR,
1703 _In_ UINT cchOutBuf,
1704 _Reserved_ PVOID*);
1705
1706 BOOL
1707 WINAPI
1708 IntlStrEqWorkerA(
1709 BOOL,
1710 _In_reads_(nChar) LPCSTR,
1711 _In_reads_(nChar) LPCSTR,
1712 int nChar);
1713
1714 BOOL
1715 WINAPI
1716 IntlStrEqWorkerW(
1717 BOOL,
1718 _In_reads_(nChar) LPCWSTR,
1719 _In_reads_(nChar) LPCWSTR,
1720 int nChar);
1721
1722 #define IntlStrEqWorker WINELIB_NAME_AW(IntlStrEqWorker)
1723
1724 #define IntlStrEqNA(s1,s2,n) IntlStrEqWorkerA(TRUE,s1,s2,n)
1725 #define IntlStrEqNW(s1,s2,n) IntlStrEqWorkerW(TRUE,s1,s2,n)
1726 #define IntlStrEqN WINELIB_NAME_AW(IntlStrEqN)
1727
1728 #define IntlStrEqNIA(s1,s2,n) IntlStrEqWorkerA(FALSE,s1,s2,n)
1729 #define IntlStrEqNIW(s1,s2,n) IntlStrEqWorkerW(FALSE,s1,s2,n)
1730 #define IntlStrEqNI WINELIB_NAME_AW(IntlStrEqNI)
1731
1732 HRESULT
1733 WINAPI
1734 StrRetToStrA(
1735 _Inout_ STRRET*,
1736 _In_opt_ LPCITEMIDLIST,
1737 _Outptr_ LPSTR*);
1738
1739 HRESULT
1740 WINAPI
1741 StrRetToStrW(
1742 _Inout_ STRRET*,
1743 _In_opt_ LPCITEMIDLIST,
1744 _Outptr_ LPWSTR*);
1745
1746 #define StrRetToStr WINELIB_NAME_AW(StrRetToStr)
1747
1748 HRESULT
1749 WINAPI
1750 StrRetToBufA(
1751 _Inout_ STRRET*,
1752 _In_opt_ LPCITEMIDLIST,
1753 _Out_writes_(cchBuf) LPSTR,
1754 UINT cchBuf);
1755
1756 HRESULT
1757 WINAPI
1758 StrRetToBufW(
1759 _Inout_ STRRET*,
1760 _In_opt_ LPCITEMIDLIST,
1761 _Out_writes_(cchBuf) LPWSTR,
1762 UINT cchBuf);
1763
1764 #define StrRetToBuf WINELIB_NAME_AW(StrRetToBuf)
1765
1766 HRESULT
1767 WINAPI
1768 StrRetToBSTR(
1769 _Inout_ STRRET*,
1770 _In_opt_ LPCITEMIDLIST,
1771 _Outptr_ BSTR*);
1772
1773 BOOL WINAPI IsCharSpaceA(CHAR);
1774 BOOL WINAPI IsCharSpaceW(WCHAR);
1775 #define IsCharSpace WINELIB_NAME_AW(IsCharSpace)
1776
1777 #endif /* NO_SHLWAPI_STRFCNS */
1778
1779
1780 /* GDI functions */
1781 #ifndef NO_SHLWAPI_GDI
1782
1783 HPALETTE WINAPI SHCreateShellPalette(_In_opt_ HDC);
1784
1785 COLORREF WINAPI ColorHLSToRGB(WORD,WORD,WORD);
1786
1787 COLORREF WINAPI ColorAdjustLuma(COLORREF,int,BOOL);
1788
1789 VOID WINAPI ColorRGBToHLS(COLORREF, _Out_ LPWORD, _Out_ LPWORD, _Out_ LPWORD);
1790
1791 #endif /* NO_SHLWAPI_GDI */
1792
1793 /* Security functions */
1794 BOOL WINAPI IsInternetESCEnabled(void);
1795
1796 /* Stream functions */
1797 #ifndef NO_SHLWAPI_STREAM
1798
1799 struct IStream *
1800 WINAPI
1801 SHOpenRegStreamA(
1802 _In_ HKEY,
1803 _In_opt_ LPCSTR,
1804 _In_opt_ LPCSTR,
1805 _In_ DWORD);
1806
1807 struct IStream *
1808 WINAPI
1809 SHOpenRegStreamW(
1810 _In_ HKEY,
1811 _In_opt_ LPCWSTR,
1812 _In_opt_ LPCWSTR,
1813 _In_ DWORD);
1814
1815 #define SHOpenRegStream WINELIB_NAME_AW(SHOpenRegStream2) /* Uses version 2 */
1816
1817 struct IStream *
1818 WINAPI
1819 SHOpenRegStream2A(
1820 _In_ HKEY,
1821 _In_opt_ LPCSTR,
1822 _In_opt_ LPCSTR,
1823 _In_ DWORD);
1824
1825 struct IStream *
1826 WINAPI
1827 SHOpenRegStream2W(
1828 _In_ HKEY,
1829 _In_opt_ LPCWSTR,
1830 _In_opt_ LPCWSTR,
1831 _In_ DWORD);
1832
1833 #define SHOpenRegStream2 WINELIB_NAME_AW(SHOpenRegStream2)
1834
1835 HRESULT
1836 WINAPI
1837 SHCreateStreamOnFileA(
1838 _In_ LPCSTR,
1839 _In_ DWORD,
1840 _Outptr_ struct IStream**);
1841
1842 HRESULT
1843 WINAPI
1844 SHCreateStreamOnFileW(
1845 _In_ LPCWSTR,
1846 _In_ DWORD,
1847 _Outptr_ struct IStream**);
1848
1849 #define SHCreateStreamOnFile WINELIB_NAME_AW(SHCreateStreamOnFile)
1850
1851 HRESULT
1852 WINAPI
1853 SHCreateStreamOnFileEx(
1854 _In_ LPCWSTR,
1855 _In_ DWORD,
1856 _In_ DWORD,
1857 _In_ BOOL,
1858 _In_opt_ struct IStream*,
1859 _Outptr_ struct IStream**);
1860
1861 HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct IStream**);
1862
1863 #endif /* NO_SHLWAPI_STREAM */
1864
1865 /* SHAutoComplete flags */
1866 #define SHACF_DEFAULT 0x00000000
1867 #define SHACF_FILESYSTEM 0x00000001
1868 #define SHACF_URLHISTORY 0x00000002
1869 #define SHACF_URLMRU 0x00000004
1870 #define SHACF_URLALL (SHACF_URLHISTORY|SHACF_URLMRU)
1871 #define SHACF_USETAB 0x00000008
1872 #define SHACF_FILESYS_ONLY 0x00000010
1873 #define SHACF_FILESYS_DIRS 0x00000020
1874 #define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000
1875 #define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000
1876 #define SHACF_AUTOAPPEND_FORCE_ON 0x40000000
1877 #define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000
1878
1879 HRESULT WINAPI SHAutoComplete(_In_ HWND, DWORD);
1880
1881 /* Threads */
1882 HRESULT WINAPI SHCreateThreadRef(_Inout_ LONG*, _Outptr_ IUnknown**);
1883 HRESULT WINAPI SHGetThreadRef(_Outptr_ IUnknown**);
1884 HRESULT WINAPI SHSetThreadRef(_In_opt_ IUnknown*);
1885 HRESULT WINAPI SHReleaseThreadRef(void);
1886
1887 /* SHCreateThread flags */
1888 #define CTF_INSIST 0x01 /* Always call */
1889 #define CTF_THREAD_REF 0x02 /* Hold thread ref */
1890 #define CTF_PROCESS_REF 0x04 /* Hold process ref */
1891 #define CTF_COINIT 0x08 /* Startup COM first */
1892 #define CTF_FREELIBANDEXIT 0x10 /* Hold DLL ref */
1893 #define CTF_REF_COUNTED 0x20 /* Thread is ref counted */
1894 #define CTF_WAIT_ALLOWCOM 0x40 /* Allow marshalling */
1895
1896 BOOL
1897 WINAPI
1898 SHCreateThread(
1899 _In_ LPTHREAD_START_ROUTINE,
1900 _In_opt_ void*,
1901 _In_ DWORD,
1902 _In_opt_ LPTHREAD_START_ROUTINE);
1903
1904 BOOL WINAPI SHSkipJunction(_In_opt_ struct IBindCtx*, _In_ const CLSID*);
1905
1906 /* Version Information */
1907
1908 typedef struct _DllVersionInfo {
1909 DWORD cbSize;
1910 DWORD dwMajorVersion;
1911 DWORD dwMinorVersion;
1912 DWORD dwBuildNumber;
1913 DWORD dwPlatformID;
1914 } DLLVERSIONINFO;
1915
1916 #define DLLVER_PLATFORM_WINDOWS 0x01 /* Win9x */
1917 #define DLLVER_PLATFORM_NT 0x02 /* WinNT */
1918
1919 typedef HRESULT (CALLBACK *DLLGETVERSIONPROC)(DLLVERSIONINFO *);
1920
1921 #ifdef __WINESRC__
1922 /* shouldn't be here, but is nice for type checking */
1923 HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *) DECLSPEC_HIDDEN;
1924 #endif
1925
1926 typedef struct _DLLVERSIONINFO2 {
1927 DLLVERSIONINFO info1;
1928 DWORD dwFlags; /* Reserved */
1929 ULONGLONG DECLSPEC_ALIGN(8) ullVersion; /* 16 bits each for Major, Minor, Build, QFE */
1930 } DLLVERSIONINFO2;
1931
1932 #define DLLVER_MAJOR_MASK 0xFFFF000000000000
1933 #define DLLVER_MINOR_MASK 0x0000FFFF00000000
1934 #define DLLVER_BUILD_MASK 0x00000000FFFF0000
1935 #define DLLVER_QFE_MASK 0x000000000000FFFF
1936
1937 #define MAKEDLLVERULL(mjr, mnr, bld, qfe) (((ULONGLONG)(mjr)<< 48)| \
1938 ((ULONGLONG)(mnr)<< 32) | ((ULONGLONG)(bld)<< 16) | (ULONGLONG)(qfe))
1939
1940 HRESULT WINAPI DllInstall(BOOL, _In_opt_ LPCWSTR) DECLSPEC_HIDDEN;
1941
1942
1943 #if (_WIN32_IE >= 0x0600)
1944 #define SHGVSPB_PERUSER 0x00000001
1945 #define SHGVSPB_ALLUSERS 0x00000002
1946 #define SHGVSPB_PERFOLDER 0x00000004
1947 #define SHGVSPB_ALLFOLDERS 0x00000008
1948 #define SHGVSPB_INHERIT 0x00000010
1949 #define SHGVSPB_ROAM 0x00000020
1950 #define SHGVSPB_NOAUTODEFAULTS 0x80000000
1951
1952 #define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
1953 #define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)
1954 #define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
1955 #define SHGVSPB_GLOBALDEAFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
1956
1957 HRESULT
1958 WINAPI
1959 SHGetViewStatePropertyBag(
1960 _In_opt_ LPCITEMIDLIST pidl,
1961 _In_opt_ LPWSTR bag_name,
1962 DWORD flags,
1963 _In_ REFIID riid,
1964 _Outptr_ void **ppv);
1965
1966 #endif /* (_WIN32_IE >= 0x0600) */
1967
1968
1969 /* IsOS definitions */
1970
1971 #define OS_WIN32SORGREATER 0x00
1972 #define OS_NT 0x01
1973 #define OS_WIN95ORGREATER 0x02
1974 #define OS_NT4ORGREATER 0x03
1975 #define OS_WIN2000ORGREATER_ALT 0x04
1976 #define OS_WIN98ORGREATER 0x05
1977 #define OS_WIN98_GOLD 0x06
1978 #define OS_WIN2000ORGREATER 0x07
1979 #define OS_WIN2000PRO 0x08
1980 #define OS_WIN2000SERVER 0x09
1981 #define OS_WIN2000ADVSERVER 0x0A
1982 #define OS_WIN2000DATACENTER 0x0B
1983 #define OS_WIN2000TERMINAL 0x0C
1984 #define OS_EMBEDDED 0x0D
1985 #define OS_TERMINALCLIENT 0x0E
1986 #define OS_TERMINALREMOTEADMIN 0x0F
1987 #define OS_WIN95_GOLD 0x10
1988 #define OS_MEORGREATER 0x11
1989 #define OS_XPORGREATER 0x12
1990 #define OS_HOME 0x13
1991 #define OS_PROFESSIONAL 0x14
1992 #define OS_DATACENTER 0x15
1993 #define OS_ADVSERVER 0x16
1994 #define OS_SERVER 0x17
1995 #define OS_TERMINALSERVER 0x18
1996 #define OS_PERSONALTERMINALSERVER 0x19
1997 #define OS_FASTUSERSWITCHING 0x1A
1998 #define OS_WELCOMELOGONUI 0x1B
1999 #define OS_DOMAINMEMBER 0x1C
2000 #define OS_ANYSERVER 0x1D
2001 #define OS_WOW6432 0x1E
2002 #define OS_WEBSERVER 0x1F
2003 #define OS_SMALLBUSINESSSERVER 0x20
2004 #define OS_TABLETPC 0x21
2005 #define OS_SERVERADMINUI 0x22
2006 #define OS_MEDIACENTER 0x23
2007 #define OS_APPLIANCE 0x24
2008
2009 BOOL WINAPI IsOS(DWORD);
2010
2011 /* SHSetTimerQueueTimer definitions */
2012 #define TPS_EXECUTEIO 0x00000001
2013 #define TPS_LONGEXECTIME 0x00000008
2014
2015 /* SHFormatDateTimeA/SHFormatDateTimeW flags */
2016 #define FDTF_SHORTTIME 0x00000001
2017 #define FDTF_SHORTDATE 0x00000002
2018 #define FDTF_DEFAULT (FDTF_SHORTDATE | FDTF_SHORTTIME)
2019 #define FDTF_LONGDATE 0x00000004
2020 #define FDTF_LONGTIME 0x00000008
2021 #define FDTF_RELATIVE 0x00000010
2022 #define FDTF_LTRDATE 0x00000100
2023 #define FDTF_RTLDATE 0x00000200
2024 #define FDTF_NOAUTOREADINGORDER 0x00000400
2025
2026
2027 typedef struct
2028 {
2029 const IID *piid;
2030 int dwOffset;
2031 } QITAB, *LPQITAB;
2032
2033 HRESULT
2034 WINAPI
2035 QISearch(
2036 _Inout_ void* base,
2037 _In_ const QITAB *pqit,
2038 _In_ REFIID riid,
2039 _Outptr_ void **ppv);
2040
2041 #define OFFSETOFCLASS(base, derived) \
2042 ((DWORD)(DWORD_PTR)(static_cast<base*>((derived*)8))-8)
2043
2044 #include <poppack.h>
2045
2046 #ifdef __cplusplus
2047 } /* extern "C" */
2048 #endif /* defined(__cplusplus) */
2049
2050 #endif /* __WINE_SHLWAPI_H */