advapi32: Constify some variables.
[wine] / include / 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(HKEY,LPCSTR);
39 DWORD WINAPI SHDeleteEmptyKeyW(HKEY,LPCWSTR);
40 #define SHDeleteEmptyKey WINELIB_NAME_AW(SHDeleteEmptyKey)
41
42 DWORD WINAPI SHDeleteKeyA(HKEY,LPCSTR);
43 DWORD WINAPI SHDeleteKeyW(HKEY,LPCWSTR);
44 #define SHDeleteKey WINELIB_NAME_AW(SHDeleteKey)
45
46 DWORD WINAPI SHDeleteValueA(HKEY,LPCSTR,LPCSTR);
47 DWORD WINAPI SHDeleteValueW(HKEY,LPCWSTR,LPCWSTR);
48 #define SHDeleteValue WINELIB_NAME_AW(SHDeleteValue)
49
50 DWORD WINAPI SHGetValueA(HKEY,LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD);
51 DWORD WINAPI SHGetValueW(HKEY,LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD);
52 #define SHGetValue WINELIB_NAME_AW(SHGetValue)
53
54 DWORD WINAPI SHSetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPCVOID,DWORD);
55 DWORD WINAPI SHSetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPCVOID,DWORD);
56 #define SHSetValue WINELIB_NAME_AW(SHSetValue)
57
58 DWORD WINAPI SHQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
59 DWORD WINAPI SHQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
60 #define SHQueryValueEx WINELIB_NAME_AW(SHQueryValueEx)
61
62 LONG WINAPI SHEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD);
63 LONG WINAPI SHEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD);
64 #define SHEnumKeyEx WINELIB_NAME_AW(SHEnumKeyEx)
65
66 LONG WINAPI SHEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
67 LONG WINAPI SHEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
68 #define SHEnumValue WINELIB_NAME_AW(SHEnumValue)
69
70 LONG WINAPI SHQueryInfoKeyA(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
71 LONG WINAPI SHQueryInfoKeyW(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
72 #define SHQueryInfoKey WINELIB_NAME_AW(SHQueryInfoKey)
73
74 DWORD WINAPI SHRegGetPathA(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD);
75 DWORD WINAPI SHRegGetPathW(HKEY,LPCWSTR,LPCWSTR,LPWSTR,DWORD);
76 #define SHRegGetPath WINELIB_NAME_AW(SHRegGetPath)
77
78 DWORD WINAPI SHRegSetPathA(HKEY,LPCSTR,LPCSTR,LPCSTR,DWORD);
79 DWORD WINAPI SHRegSetPathW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
80 #define SHRegSetPath WINELIB_NAME_AW(SHRegSetPath)
81
82 DWORD WINAPI SHCopyKeyA(HKEY,LPCSTR,HKEY,DWORD);
83 DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD);
84 #define SHCopyKey WINELIB_NAME_AW(SHCopyKey)
85
86 /* Undocumented registry functions */
87
88 HKEY WINAPI  SHRegDuplicateHKey(HKEY);
89
90 DWORD WINAPI SHDeleteOrphanKeyA(HKEY,LPCSTR);
91 DWORD WINAPI SHDeleteOrphanKeyW(HKEY,LPCWSTR);
92 #define SHDeleteOrphanKey WINELIB_NAME_AW(SHDeleteOrphanKey)
93
94
95 /* User registry functions */
96
97 typedef enum
98 {
99   SHREGDEL_DEFAULT = 0,
100   SHREGDEL_HKCU    = 0x1,
101   SHREGDEL_HKLM    = 0x10,
102   SHREGDEL_BOTH    = SHREGDEL_HKLM | SHREGDEL_HKCU
103 } SHREGDEL_FLAGS;
104
105 typedef enum
106 {
107   SHREGENUM_DEFAULT = 0,
108   SHREGENUM_HKCU    = 0x1,
109   SHREGENUM_HKLM    = 0x10,
110   SHREGENUM_BOTH    = SHREGENUM_HKLM | SHREGENUM_HKCU
111 } SHREGENUM_FLAGS;
112
113 #define SHREGSET_HKCU       0x1 /* Apply to HKCU if empty */
114 #define SHREGSET_FORCE_HKCU 0x2 /* Always apply to HKCU */
115 #define SHREGSET_HKLM       0x4 /* Apply to HKLM if empty */
116 #define SHREGSET_FORCE_HKLM 0x8 /* Always apply to HKLM */
117 #define SHREGSET_DEFAULT    (SHREGSET_FORCE_HKCU | SHREGSET_HKLM)
118
119 typedef HANDLE HUSKEY;
120 typedef HUSKEY *PHUSKEY;
121
122 LONG WINAPI SHRegCreateUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
123 LONG WINAPI SHRegCreateUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
124 #define SHRegCreateUSKey WINELIB_NAME_AW(SHRegCreateUSKey)
125
126 LONG WINAPI SHRegOpenUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,BOOL);
127 LONG WINAPI SHRegOpenUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,BOOL);
128 #define SHRegOpenUSKey WINELIB_NAME_AW(SHRegOpenUSKey)
129
130 LONG WINAPI SHRegQueryUSValueA(HUSKEY,LPCSTR,LPDWORD,LPVOID,LPDWORD,
131                                BOOL,LPVOID,DWORD);
132 LONG WINAPI SHRegQueryUSValueW(HUSKEY,LPCWSTR,LPDWORD,LPVOID,LPDWORD,
133                                BOOL,LPVOID,DWORD);
134 #define SHRegQueryUSValue WINELIB_NAME_AW(SHRegQueryUSValue)
135
136 LONG WINAPI SHRegWriteUSValueA(HUSKEY,LPCSTR,DWORD,LPVOID,DWORD,DWORD);
137 LONG WINAPI SHRegWriteUSValueW(HUSKEY,LPCWSTR,DWORD,LPVOID,DWORD,DWORD);
138 #define SHRegWriteUSValue WINELIB_NAME_AW(SHRegWriteUSValue)
139
140 LONG WINAPI SHRegDeleteUSValueA(HUSKEY,LPCSTR,SHREGDEL_FLAGS);
141 LONG WINAPI SHRegDeleteUSValueW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS);
142 #define SHRegDeleteUSValue WINELIB_NAME_AW(SHRegDeleteUSValue)
143
144 LONG WINAPI SHRegDeleteEmptyUSKeyA(HUSKEY,LPCSTR,SHREGDEL_FLAGS);
145 LONG WINAPI SHRegDeleteEmptyUSKeyW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS);
146 #define SHRegDeleteEmptyUSKey WINELIB_NAME_AW(SHRegDeleteEmptyUSKey)
147
148 LONG WINAPI SHRegEnumUSKeyA(HUSKEY,DWORD,LPSTR,LPDWORD,SHREGENUM_FLAGS);
149 LONG WINAPI SHRegEnumUSKeyW(HUSKEY,DWORD,LPWSTR,LPDWORD,SHREGENUM_FLAGS);
150 #define SHRegEnumUSKey WINELIB_NAME_AW(SHRegEnumUSKey)
151
152 LONG WINAPI SHRegEnumUSValueA(HUSKEY,DWORD,LPSTR,LPDWORD,LPDWORD,
153                               LPVOID,LPDWORD,SHREGENUM_FLAGS);
154 LONG WINAPI SHRegEnumUSValueW(HUSKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,
155                               LPVOID,LPDWORD,SHREGENUM_FLAGS);
156 #define SHRegEnumUSValue WINELIB_NAME_AW(SHRegEnumUSValue)
157
158 LONG WINAPI SHRegQueryInfoUSKeyA(HUSKEY,LPDWORD,LPDWORD,LPDWORD,
159                                  LPDWORD,SHREGENUM_FLAGS);
160 LONG WINAPI SHRegQueryInfoUSKeyW(HUSKEY,LPDWORD,LPDWORD,LPDWORD,
161                                  LPDWORD,SHREGENUM_FLAGS);
162 #define SHRegQueryInfoUSKey WINELIB_NAME_AW(SHRegQueryInfoUSKey)
163
164 LONG WINAPI SHRegCloseUSKey(HUSKEY);
165
166 LONG WINAPI SHRegGetUSValueA(LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD,
167                              BOOL,LPVOID,DWORD);
168 LONG WINAPI SHRegGetUSValueW(LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD,
169                              BOOL,LPVOID,DWORD);
170 #define SHRegGetUSValue WINELIB_NAME_AW(SHRegGetUSValue)
171
172 LONG WINAPI SHRegSetUSValueA(LPCSTR,LPCSTR,DWORD,LPVOID,DWORD,DWORD);
173 LONG WINAPI SHRegSetUSValueW(LPCWSTR,LPCWSTR,DWORD,LPVOID,DWORD,DWORD);
174 #define SHRegSetUSValue WINELIB_NAME_AW(SHRegSetUSValue)
175
176 BOOL WINAPI SHRegGetBoolUSValueA(LPCSTR,LPCSTR,BOOL,BOOL);
177 BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR,LPCWSTR,BOOL,BOOL);
178 #define SHRegGetBoolUSValue WINELIB_NAME_AW(SHRegGetBoolUSValue)
179
180 int WINAPI SHRegGetIntW(HKEY,LPCWSTR,int);
181
182 /* IQueryAssociation and helpers */
183 enum
184 {
185     ASSOCF_INIT_NOREMAPCLSID    = 0x001, /* Don't map clsid->progid */
186     ASSOCF_INIT_BYEXENAME       = 0x002, /* .exe name given */
187     ASSOCF_OPEN_BYEXENAME       = 0x002, /* Synonym */
188     ASSOCF_INIT_DEFAULTTOSTAR   = 0x004, /* Use * as base */
189     ASSOCF_INIT_DEFAULTTOFOLDER = 0x008, /* Use folder as base */
190     ASSOCF_NOUSERSETTINGS       = 0x010, /* No HKCU reads */
191     ASSOCF_NOTRUNCATE           = 0x020, /* Don't truncate return */
192     ASSOCF_VERIFY               = 0x040, /* Verify data */
193     ASSOCF_REMAPRUNDLL          = 0x080, /* Get rundll args */
194     ASSOCF_NOFIXUPS             = 0x100, /* Don't fixup errors */
195     ASSOCF_IGNOREBASECLASS      = 0x200, /* Don't read baseclass */
196 };
197
198 typedef DWORD ASSOCF;
199
200 typedef enum
201 {
202     ASSOCSTR_COMMAND = 1,     /* Verb command */
203     ASSOCSTR_EXECUTABLE,      /* .exe from command string */
204     ASSOCSTR_FRIENDLYDOCNAME, /* Friendly doc type name */
205     ASSOCSTR_FRIENDLYAPPNAME, /* Friendly .exe name */
206     ASSOCSTR_NOOPEN,          /* noopen value */
207     ASSOCSTR_SHELLNEWVALUE,   /* Use shellnew key */
208     ASSOCSTR_DDECOMMAND,      /* DDE command template */
209     ASSOCSTR_DDEIFEXEC,       /* DDE command for process create */
210     ASSOCSTR_DDEAPPLICATION,  /* DDE app name */
211     ASSOCSTR_DDETOPIC,        /* DDE topic */
212     ASSOCSTR_INFOTIP,         /* Infotip */
213     ASSOCSTR_QUICKTIP,        /* Quick infotip */
214     ASSOCSTR_TILEINFO,        /* Properties for tileview */
215     ASSOCSTR_CONTENTTYPE,     /* Mimetype */
216     ASSOCSTR_DEFAULTICON,     /* Icon */
217     ASSOCSTR_SHELLEXTENSION,  /* GUID for shell extension handler */
218     ASSOCSTR_MAX
219 } ASSOCSTR;
220
221 typedef enum
222 {
223     ASSOCKEY_SHELLEXECCLASS = 1, /* Key for ShellExec */
224     ASSOCKEY_APP,                /* Application */
225     ASSOCKEY_CLASS,              /* Progid or class */
226     ASSOCKEY_BASECLASS,          /* Base class */
227     ASSOCKEY_MAX
228 } ASSOCKEY;
229
230 typedef enum
231 {
232     ASSOCDATA_MSIDESCRIPTOR = 1, /* Component descriptor */
233     ASSOCDATA_NOACTIVATEHANDLER, /* Don't activate */
234     ASSOCDATA_QUERYCLASSSTORE,   /* Look in Class Store */
235     ASSOCDATA_HASPERUSERASSOC,   /* Use user association */
236     ASSOCDATA_EDITFLAGS,         /* Edit flags */
237     ASSOCDATA_VALUE,             /* pszExtra is value */
238     ASSOCDATA_MAX
239 } ASSOCDATA;
240
241 typedef enum
242 {
243     ASSOCENUM_NONE
244 } ASSOCENUM;
245
246 typedef struct IQueryAssociations *LPQUERYASSOCIATIONS;
247
248 #define INTERFACE IQueryAssociations
249 DECLARE_INTERFACE_(IQueryAssociations,IUnknown)
250 {
251     /*** IUnknown methods ***/
252     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
253     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
254     STDMETHOD_(ULONG,Release)(THIS) PURE;
255     /*** IQueryAssociations methods ***/
256     STDMETHOD(Init)(THIS_ ASSOCF  flags, LPCWSTR  pszAssoc, HKEY  hkProgid, HWND  hwnd) PURE;
257     STDMETHOD(GetString)(THIS_ ASSOCF  flags, ASSOCSTR  str, LPCWSTR  pszExtra, LPWSTR  pszOut, DWORD * pcchOut) PURE;
258     STDMETHOD(GetKey)(THIS_ ASSOCF  flags, ASSOCKEY  key, LPCWSTR  pszExtra, HKEY * phkeyOut) PURE;
259     STDMETHOD(GetData)(THIS_ ASSOCF  flags, ASSOCDATA  data, LPCWSTR  pszExtra, LPVOID  pvOut, DWORD * pcbOut) PURE;
260     STDMETHOD(GetEnum)(THIS_ ASSOCF  flags, ASSOCENUM  assocenum, LPCWSTR  pszExtra, REFIID  riid, LPVOID * ppvOut) PURE;
261 };
262 #undef INTERFACE
263
264 #if !defined(__cplusplus) || defined(CINTERFACE)
265 #define IQueryAssociations_QueryInterface(p,a,b)   (p)->lpVtbl->QueryInterface(p,a,b)
266 #define IQueryAssociations_AddRef(p)               (p)->lpVtbl->AddRef(p)
267 #define IQueryAssociations_Release(p)              (p)->lpVtbl->Release(p)
268 #define IQueryAssociations_Init(p,a,b,c,d)         (p)->lpVtbl->Init(p,a,b,c,d)
269 #define IQueryAssociations_GetString(p,a,b,c,d,e)  (p)->lpVtbl->GetString(p,a,b,c,d,e)
270 #define IQueryAssociations_GetKey(p,a,b,c,d)       (p)->lpVtbl->GetKey(p,a,b,c,d)
271 #define IQueryAssociations_GetData(p,a,b,c,d,e)    (p)->lpVtbl->GetData(p,a,b,c,d,e)
272 #define IQueryAssociations_GetEnum(p,a,b,c,d,e)    (p)->lpVtbl->GetEnum(p,a,b,c,d,e)
273 #endif
274
275 HRESULT WINAPI AssocCreate(CLSID,REFIID,LPVOID*);
276
277 HRESULT WINAPI AssocQueryStringA(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD);
278 HRESULT WINAPI AssocQueryStringW(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD);
279 #define AssocQueryString WINELIB_NAME_AW(AssocQueryString)
280
281 HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF,ASSOCSTR,HKEY,LPCSTR,LPSTR,LPDWORD);
282 HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF,ASSOCSTR,HKEY,LPCWSTR,LPWSTR,LPDWORD);
283 #define AssocQueryStringByKey WINELIB_NAME_AW(AssocQueryStringByKey)
284
285 HRESULT WINAPI AssocQueryKeyA(ASSOCF,ASSOCKEY,LPCSTR,LPCSTR,PHKEY);
286 HRESULT WINAPI AssocQueryKeyW(ASSOCF,ASSOCKEY,LPCWSTR,LPCWSTR,PHKEY);
287 #define AssocQueryKey WINELIB_NAME_AW(AssocQueryKey)
288
289 BOOL WINAPI AssocIsDangerous(LPCWSTR);
290
291 #endif /* NO_SHLWAPI_REG */
292
293
294 /* Path functions */
295 #ifndef NO_SHLWAPI_PATH
296
297 /* GetPathCharType return flags */
298 #define GCT_INVALID     0x0
299 #define GCT_LFNCHAR     0x1
300 #define GCT_SHORTCHAR   0x2
301 #define GCT_WILD        0x4
302 #define GCT_SEPARATOR   0x8
303
304 LPSTR  WINAPI PathAddBackslashA(LPSTR);
305 LPWSTR WINAPI PathAddBackslashW(LPWSTR);
306 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
307
308 BOOL WINAPI PathAddExtensionA(LPSTR,LPCSTR);
309 BOOL WINAPI PathAddExtensionW(LPWSTR,LPCWSTR);
310 #define PathAddExtension WINELIB_NAME_AW(PathAddExtension)
311
312 BOOL WINAPI PathAppendA(LPSTR,LPCSTR);
313 BOOL WINAPI PathAppendW(LPWSTR,LPCWSTR);
314 #define PathAppend WINELIB_NAME_AW(PathAppend)
315
316 LPSTR  WINAPI PathBuildRootA(LPSTR,int);
317 LPWSTR WINAPI PathBuildRootW(LPWSTR,int);
318 #define PathBuildRoot WINELIB_NAME_AW(PathBuiltRoot)
319
320 BOOL WINAPI PathCanonicalizeA(LPSTR,LPCSTR);
321 BOOL WINAPI PathCanonicalizeW(LPWSTR,LPCWSTR);
322 #define PathCanonicalize WINELIB_NAME_AW(PathCanonicalize)
323
324 LPSTR  WINAPI PathCombineA(LPSTR,LPCSTR,LPCSTR);
325 LPWSTR WINAPI PathCombineW(LPWSTR,LPCWSTR,LPCWSTR);
326 #define PathCombine WINELIB_NAME_AW(PathCombine)
327
328 BOOL WINAPI PathCompactPathA(HDC,LPSTR,UINT);
329 BOOL WINAPI PathCompactPathW(HDC,LPWSTR,UINT);
330 #define PathCompactPath WINELIB_NAME_AW(PathCompactPath)
331
332 BOOL WINAPI PathCompactPathExA(LPSTR,LPCSTR,UINT,DWORD);
333 BOOL WINAPI PathCompactPathExW(LPWSTR,LPCWSTR,UINT,DWORD);
334 #define PathCompactPathEx WINELIB_NAME_AW(PathCompactPathEx)
335
336 int WINAPI PathCommonPrefixA(LPCSTR,LPCSTR,LPSTR);
337 int WINAPI PathCommonPrefixW(LPCWSTR,LPCWSTR,LPWSTR);
338 #define PathCommonPrefix WINELIB_NAME_AW(PathCommonPrefix)
339
340 HRESULT WINAPI PathCreateFromUrlA(LPCSTR pszUrl, LPSTR pszPath, LPDWORD pcchPath, DWORD dwReserved);
341 HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved);
342 #define PathCreateFromUrl WINELIB_NANE_AW(PathCreateFromUrl)
343
344 BOOL WINAPI PathFileExistsA(LPCSTR);
345 BOOL WINAPI PathFileExistsW(LPCWSTR);
346 #define PathFileExists WINELIB_NAME_AW(PathFileExists)
347
348 BOOL WINAPI PathFileExistsAndAttributesA(LPCSTR lpszPath, DWORD *dwAttr);
349 BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr);
350 #define PathFileExistsAndAttributes WINELIB_NAME_AW(PathFileExistsAndAttributes)
351
352 LPSTR  WINAPI PathFindExtensionA(LPCSTR);
353 LPWSTR WINAPI PathFindExtensionW(LPCWSTR);
354 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
355
356 LPSTR  WINAPI PathFindFileNameA(LPCSTR);
357 LPWSTR WINAPI PathFindFileNameW(LPCWSTR);
358 #define PathFindFileName WINELIB_NAME_AW(PathFindFileName)
359
360 LPSTR  WINAPI PathFindNextComponentA(LPCSTR);
361 LPWSTR WINAPI PathFindNextComponentW(LPCWSTR);
362 #define PathFindNextComponent WINELIB_NAME_AW(PathFindNextComponent)
363
364 BOOL WINAPI PathFindOnPathA(LPSTR,LPCSTR*);
365 BOOL WINAPI PathFindOnPathW(LPWSTR,LPCWSTR*);
366 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
367
368 LPSTR  WINAPI PathGetArgsA(LPCSTR);
369 LPWSTR WINAPI PathGetArgsW(LPCWSTR);
370 #define PathGetArgs WINELIB_NAME_AW(PathGetArgs)
371
372 UINT WINAPI PathGetCharTypeA(UCHAR);
373 UINT WINAPI PathGetCharTypeW(WCHAR);
374 #define PathGetCharType WINELIB_NAME_AW(PathGetCharType)
375
376 int WINAPI PathGetDriveNumberA(LPCSTR);
377 int WINAPI PathGetDriveNumberW(LPCWSTR);
378 #define PathGetDriveNumber WINELIB_NAME_AW(PathGetDriveNumber)
379
380 BOOL WINAPI PathIsDirectoryA(LPCSTR);
381 BOOL WINAPI PathIsDirectoryW(LPCWSTR);
382 #define PathIsDirectory WINELIB_NAME_AW(PathIsDirectory)
383
384 BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR);
385 BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR);
386 #define PathIsDirectoryEmpty WINELIB_NAME_AW(PathIsDirectoryEmpty)
387
388 BOOL WINAPI PathIsFileSpecA(LPCSTR);
389 BOOL WINAPI PathIsFileSpecW(LPCWSTR);
390 #define PathIsFileSpec WINELIB_NAME_AW(PathIsFileSpec);
391
392 BOOL WINAPI PathIsPrefixA(LPCSTR,LPCSTR);
393 BOOL WINAPI PathIsPrefixW(LPCWSTR,LPCWSTR);
394 #define PathIsPrefix WINELIB_NAME_AW(PathIsPrefix)
395
396 BOOL WINAPI PathIsRelativeA(LPCSTR);
397 BOOL WINAPI PathIsRelativeW(LPCWSTR);
398 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
399
400 BOOL WINAPI PathIsRootA(LPCSTR);
401 BOOL WINAPI PathIsRootW(LPCWSTR);
402 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
403
404 BOOL WINAPI PathIsSameRootA(LPCSTR,LPCSTR);
405 BOOL WINAPI PathIsSameRootW(LPCWSTR,LPCWSTR);
406 #define PathIsSameRoot WINELIB_NAME_AW(PathIsSameRoot)
407
408 BOOL WINAPI PathIsUNCA(LPCSTR);
409 BOOL WINAPI PathIsUNCW(LPCWSTR);
410 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
411
412 BOOL WINAPI PathIsUNCServerA(LPCSTR);
413 BOOL WINAPI PathIsUNCServerW(LPCWSTR);
414 #define PathIsUNCServer WINELIB_NAME_AW(PathIsUNCServer)
415
416 BOOL WINAPI PathIsUNCServerShareA(LPCSTR);
417 BOOL WINAPI PathIsUNCServerShareW(LPCWSTR);
418 #define PathIsUNCServerShare WINELIB_NAME_AW(PathIsUNCServerShare)
419
420 BOOL WINAPI PathIsContentTypeA(LPCSTR,LPCSTR);
421 BOOL WINAPI PathIsContentTypeW(LPCWSTR,LPCWSTR);
422 #define PathIsContentType WINELIB_NAME_AW(PathIsContentType)
423
424 BOOL WINAPI PathIsURLA(LPCSTR);
425 BOOL WINAPI PathIsURLW(LPCWSTR);
426 #define PathIsURL WINELIB_NAME_AW(PathIsURL)
427
428 BOOL WINAPI PathMakePrettyA(LPSTR);
429 BOOL WINAPI PathMakePrettyW(LPWSTR);
430 #define PathMakePretty WINELIB_NAME_AW(PathMakePretty)
431
432 BOOL WINAPI PathMatchSpecA(LPCSTR,LPCSTR);
433 BOOL WINAPI PathMatchSpecW(LPCWSTR,LPCWSTR);
434 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
435
436 int WINAPI PathParseIconLocationA(LPSTR);
437 int WINAPI PathParseIconLocationW(LPWSTR);
438 #define PathParseIconLocation WINELIB_NAME_AW(PathParseIconLocation)
439
440 VOID WINAPI PathQuoteSpacesA(LPSTR);
441 VOID WINAPI PathQuoteSpacesW(LPWSTR);
442 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
443
444 BOOL WINAPI PathRelativePathToA(LPSTR,LPCSTR,DWORD,LPCSTR,DWORD);
445 BOOL WINAPI PathRelativePathToW(LPWSTR,LPCWSTR,DWORD,LPCWSTR,DWORD);
446 #define PathRelativePathTo WINELIB_NAME_AW(PathRelativePathTo)
447
448 VOID WINAPI PathRemoveArgsA(LPSTR);
449 VOID WINAPI PathRemoveArgsW(LPWSTR);
450 #define PathRemoveArgs WINELIB_NAME_AW(PathRemoveArgs)
451
452 LPSTR  WINAPI PathRemoveBackslashA(LPSTR);
453 LPWSTR WINAPI PathRemoveBackslashW(LPWSTR);
454 #define PathRemoveBackslash WINELIB_NAME_AW(PathRemoveBackslash)
455
456 VOID WINAPI PathRemoveBlanksA(LPSTR);
457 VOID WINAPI PathRemoveBlanksW(LPWSTR);
458 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
459
460 VOID WINAPI PathRemoveExtensionA(LPSTR);
461 VOID WINAPI PathRemoveExtensionW(LPWSTR);
462 #define PathRemoveExtension WINELIB_NAME_AW(PathRemoveExtension)
463
464 BOOL WINAPI PathRemoveFileSpecA(LPSTR);
465 BOOL WINAPI PathRemoveFileSpecW(LPWSTR);
466 #define PathRemoveFileSpec WINELIB_NAME_AW(PathRemoveFileSpec)
467
468 BOOL WINAPI PathRenameExtensionA(LPSTR,LPCSTR);
469 BOOL WINAPI PathRenameExtensionW(LPWSTR,LPCWSTR);
470 #define PathRenameExtension WINELIB_NAME_AW(PathRenameExtension)
471
472 BOOL WINAPI PathSearchAndQualifyA(LPCSTR,LPSTR,UINT);
473 BOOL WINAPI PathSearchAndQualifyW(LPCWSTR,LPWSTR,UINT);
474 #define PathSearchAndQualify WINELIB_NAME_AW(PathSearchAndQualify)
475
476 VOID WINAPI PathSetDlgItemPathA(HWND,int,LPCSTR);
477 VOID WINAPI PathSetDlgItemPathW(HWND,int,LPCWSTR);
478 #define PathSetDlgItemPath WINELIB_NAME_AW(PathSetDlgItemPath)
479
480 LPSTR  WINAPI PathSkipRootA(LPCSTR);
481 LPWSTR WINAPI PathSkipRootW(LPCWSTR);
482 #define PathSkipRoot WINELIB_NAME_AW(PathSkipRoot)
483
484 VOID WINAPI PathStripPathA(LPSTR);
485 VOID WINAPI PathStripPathW(LPWSTR);
486 #define PathStripPath WINELIB_NAME_AW(PathStripPath)
487
488 BOOL WINAPI PathStripToRootA(LPSTR);
489 BOOL WINAPI PathStripToRootW(LPWSTR);
490 #define PathStripToRoot WINELIB_NAME_AW(PathStripToRoot)
491
492 VOID WINAPI PathUnquoteSpacesA(LPSTR);
493 VOID WINAPI PathUnquoteSpacesW(LPWSTR);
494 #define PathUnquoteSpaces WINELIB_NAME_AW(PathUnquoteSpaces)
495
496 BOOL WINAPI PathMakeSystemFolderA(LPCSTR);
497 BOOL WINAPI PathMakeSystemFolderW(LPCWSTR);
498 #define PathMakeSystemFolder WINELIB_NAME_AW(PathMakeSystemFolder)
499
500 BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR);
501 BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR);
502 #define PathUnmakeSystemFolder WINELIB_NAME_AW(PathUnmakeSystemFolder)
503
504 BOOL WINAPI PathIsSystemFolderA(LPCSTR,DWORD);
505 BOOL WINAPI PathIsSystemFolderW(LPCWSTR,DWORD);
506 #define PathIsSystemFolder WINELIB_NAME_AW(PathIsSystemFolder)
507
508 BOOL WINAPI PathIsNetworkPathA(LPCSTR);
509 BOOL WINAPI PathIsNetworkPathW(LPCWSTR);
510 #define PathIsNetworkPath WINELIB_NAME_AW(PathIsNetworkPath)
511
512 BOOL WINAPI PathIsLFNFileSpecA(LPCSTR);
513 BOOL WINAPI PathIsLFNFileSpecW(LPCWSTR);
514 #define PathIsLFNFileSpec WINELIB_NAME_AW(PathIsLFNFileSpec)
515
516 LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR,LPCSTR *,int);
517 LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR,LPCWSTR *,int);
518 #define PathFindSuffixArray WINELIB_NAME_AW(PathFindSuffixArray)
519
520 VOID WINAPI PathUndecorateA(LPSTR);
521 VOID WINAPI PathUndecorateW(LPWSTR);
522 #define PathUndecorate WINELIB_NAME_AW(PathUndecorate)
523
524 BOOL WINAPI PathUnExpandEnvStringsA(LPCSTR,LPSTR,UINT);
525 BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR,LPWSTR,UINT);
526 #define PathUnExpandEnvStrings WINELIB_NAME_AW(PathUnExpandEnvStrings)
527
528 /* Url functions */
529 typedef enum {
530     URL_SCHEME_INVALID     = -1,
531     URL_SCHEME_UNKNOWN     =  0,
532     URL_SCHEME_FTP,
533     URL_SCHEME_HTTP,
534     URL_SCHEME_GOPHER,
535     URL_SCHEME_MAILTO,
536     URL_SCHEME_NEWS,
537     URL_SCHEME_NNTP,
538     URL_SCHEME_TELNET,
539     URL_SCHEME_WAIS,
540     URL_SCHEME_FILE,
541     URL_SCHEME_MK,
542     URL_SCHEME_HTTPS,
543     URL_SCHEME_SHELL,
544     URL_SCHEME_SNEWS,
545     URL_SCHEME_LOCAL,
546     URL_SCHEME_JAVASCRIPT,
547     URL_SCHEME_VBSCRIPT,
548     URL_SCHEME_ABOUT,
549     URL_SCHEME_RES,
550     URL_SCHEME_MSSHELLROOTED,
551     URL_SCHEME_MSSHELLIDLIST,
552     URL_SCHEME_MSHELP,
553     URL_SCHEME_MAXVALUE
554 } URL_SCHEME;
555
556 /* These are used by UrlGetPart routine */
557 typedef enum {
558     URL_PART_NONE    = 0,
559     URL_PART_SCHEME  = 1,
560     URL_PART_HOSTNAME,
561     URL_PART_USERNAME,
562     URL_PART_PASSWORD,
563     URL_PART_PORT,
564     URL_PART_QUERY
565 } URL_PART;
566
567 #define URL_PARTFLAG_KEEPSCHEME  0x00000001
568
569 /* These are used by the UrlIs... routines */
570 typedef enum {
571     URLIS_URL,
572     URLIS_OPAQUE,
573     URLIS_NOHISTORY,
574     URLIS_FILEURL,
575     URLIS_APPLIABLE,
576     URLIS_DIRECTORY,
577     URLIS_HASQUERY
578 } URLIS;
579
580 /* This is used by the UrlApplyScheme... routines */
581 #define URL_APPLY_FORCEAPPLY         0x00000008
582 #define URL_APPLY_GUESSFILE          0x00000004
583 #define URL_APPLY_GUESSSCHEME        0x00000002
584 #define URL_APPLY_DEFAULT            0x00000001
585
586 /* The following are used by UrlEscape..., UrlUnEscape...,
587  * UrlCanonicalize..., and UrlCombine... routines
588  */
589 #define URL_WININET_COMPATIBILITY    0x80000000
590 #define URL_PLUGGABLE_PROTOCOL       0x40000000
591 #define URL_ESCAPE_UNSAFE            0x20000000
592 #define URL_UNESCAPE                 0x10000000
593
594 #define URL_DONT_SIMPLIFY            0x08000000
595 #define URL_NO_META                  URL_DONT_SIMPLIFY
596 #define URL_ESCAPE_SPACES_ONLY       0x04000000
597 #define URL_DONT_ESCAPE_EXTRA_INFO   0x02000000
598 #define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
599 #define URL_BROWSER_MODE             URL_DONT_ESCAPE_EXTRA_INFO
600
601 #define URL_INTERNAL_PATH            0x00800000  /* Will escape #'s in paths */
602 #define URL_UNESCAPE_HIGH_ANSI_ONLY  0x00400000
603 #define URL_CONVERT_IF_DOSPATH       0x00200000
604 #define URL_UNESCAPE_INPLACE         0x00100000
605
606 #define URL_FILE_USE_PATHURL         0x00010000
607
608 #define URL_ESCAPE_SEGMENT_ONLY      0x00002000
609 #define URL_ESCAPE_PERCENT           0x00001000
610
611 HRESULT WINAPI UrlApplySchemeA(LPCSTR,LPSTR,LPDWORD,DWORD);
612 HRESULT WINAPI UrlApplySchemeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
613 #define UrlApplyScheme WINELIB_NAME_AW(UrlApplyScheme)
614
615 HRESULT WINAPI UrlCanonicalizeA(LPCSTR,LPSTR,LPDWORD,DWORD);
616 HRESULT WINAPI UrlCanonicalizeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
617 #define UrlCanonicalize WINELIB_NAME_AW(UrlCanoncalize)
618
619 HRESULT WINAPI UrlCombineA(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD);
620 HRESULT WINAPI UrlCombineW(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD);
621 #define UrlCombine WINELIB_NAME_AW(UrlCombine)
622
623 INT WINAPI UrlCompareA(LPCSTR,LPCSTR,BOOL);
624 INT WINAPI UrlCompareW(LPCWSTR,LPCWSTR,BOOL);
625 #define UrlCompare WINELIB_NAME_AW(UrlCompare)
626
627 HRESULT WINAPI UrlEscapeA(LPCSTR,LPSTR,LPDWORD,DWORD);
628 HRESULT WINAPI UrlEscapeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
629 #define UrlEscape WINELIB_NAME_AW(UrlEscape)
630
631 #define UrlEscapeSpacesA(x,y,z) UrlCanonicalizeA(x, y, z, \
632                          URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY)
633 #define UrlEscapeSpacesW(x,y,z) UrlCanonicalizeW(x, y, z, \
634                          URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY)
635 #define UrlEscapeSpaces WINELIB_NAME_AW(UrlEscapeSpaces)
636
637 LPCSTR  WINAPI UrlGetLocationA(LPCSTR);
638 LPCWSTR WINAPI UrlGetLocationW(LPCWSTR);
639 #define UrlGetLocation WINELIB_NAME_AW(UrlGetLocation)
640
641 HRESULT WINAPI UrlGetPartA(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD);
642 HRESULT WINAPI UrlGetPartW(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD);
643 #define UrlGetPart WINELIB_NAME_AW(UrlGetPart)
644
645 HRESULT WINAPI HashData(const unsigned char *,DWORD,unsigned char *lpDest,DWORD);
646
647 HRESULT WINAPI UrlHashA(LPCSTR,unsigned char *,DWORD);
648 HRESULT WINAPI UrlHashW(LPCWSTR,unsigned char *,DWORD);
649 #define UrlHash WINELIB_NAME_AW(UrlHash)
650
651 BOOL    WINAPI UrlIsA(LPCSTR,URLIS);
652 BOOL    WINAPI UrlIsW(LPCWSTR,URLIS);
653 #define UrlIs WINELIB_NAME_AW(UrlIs)
654
655 BOOL    WINAPI UrlIsNoHistoryA(LPCSTR);
656 BOOL    WINAPI UrlIsNoHistoryW(LPCWSTR);
657 #define UrlIsNoHistory WINELIB_NAME_AW(UrlIsNoHistory)
658
659 BOOL    WINAPI UrlIsOpaqueA(LPCSTR);
660 BOOL    WINAPI UrlIsOpaqueW(LPCWSTR);
661 #define UrlIsOpaque WINELIB_NAME_AW(UrlIsOpaque)
662
663 #define UrlIsFileUrlA(x) UrlIsA(x, URLIS_FILEURL)
664 #define UrlIsFileUrlW(y) UrlIsW(x, URLIS_FILEURL)
665 #define UrlIsFileUrl WINELIB_NAME_AW(UrlIsFileUrl)
666
667 HRESULT WINAPI UrlUnescapeA(LPSTR,LPSTR,LPDWORD,DWORD);
668 HRESULT WINAPI UrlUnescapeW(LPWSTR,LPWSTR,LPDWORD,DWORD);
669 #define UrlUnescape WINELIB_AW_NAME(UrlUnescape)
670
671 #define UrlUnescapeInPlaceA(x,y) UrlUnescapeA(x, NULL, NULL, \
672                                               y | URL_UNESCAPE_INPLACE)
673 #define UrlUnescapeInPlaceW(x,y) UrlUnescapeW(x, NULL, NULL, \
674                                               y | URL_UNESCAPE_INPLACE)
675 #define UrlUnescapeInPlace WINELIB_AW_NAME(UrlUnescapeInPlace)
676
677 HRESULT WINAPI UrlCreateFromPathA(LPCSTR,LPSTR,LPDWORD,DWORD);
678 HRESULT WINAPI UrlCreateFromPathW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
679 #define UrlCreateFromPath WINELIB_AW_NAME(UrlCreateFromPath)
680
681 typedef struct tagPARSEDURLA {
682     DWORD cbSize;
683     LPCSTR pszProtocol;
684     UINT cchProtocol;
685     LPCSTR pszSuffix;
686     UINT cchSuffix;
687     UINT nScheme;
688 } PARSEDURLA, *PPARSEDURLA;
689
690 typedef struct tagPARSEDURLW {
691     DWORD cbSize;
692     LPCWSTR pszProtocol;
693     UINT cchProtocol;
694     LPCWSTR pszSuffix;
695     UINT cchSuffix;
696     UINT nScheme;
697 } PARSEDURLW, *PPARSEDURLW;
698
699 HRESULT WINAPI ParseURLA(LPCSTR pszUrl, PARSEDURLA *ppu);
700 HRESULT WINAPI ParseURLW(LPCWSTR pszUrl, PARSEDURLW *ppu);
701 #define ParseURL WINELIB_AW_NAME(ParseUrl)
702
703 #endif /* NO_SHLWAPI_PATH */
704
705
706 /* String functions */
707 #ifndef NO_SHLWAPI_STRFCNS
708
709 /* StrToIntEx flags */
710 #define STIF_DEFAULT     0x0L
711 #define STIF_SUPPORT_HEX 0x1L
712
713 BOOL WINAPI ChrCmpIA (WORD,WORD);
714 BOOL WINAPI ChrCmpIW (WCHAR,WCHAR);
715 #define ChrCmpI WINELIB_NAME_AW(ChrCmpI)
716
717 INT WINAPI StrCSpnA(LPCSTR,LPCSTR);
718 INT WINAPI StrCSpnW(LPCWSTR,LPCWSTR);
719 #define StrCSpn WINELIB_NAME_AW(StrCSpn)
720
721 INT WINAPI StrCSpnIA(LPCSTR,LPCSTR);
722 INT WINAPI StrCSpnIW(LPCWSTR,LPCWSTR);
723 #define StrCSpnI WINELIB_NAME_AW(StrCSpnI)
724
725 #define StrCatA lstrcatA
726 LPWSTR WINAPI StrCatW(LPWSTR,LPCWSTR);
727 #define StrCat WINELIB_NAME_AW(StrCat)
728
729 LPSTR WINAPI StrCatBuffA(LPSTR,LPCSTR,INT);
730 LPWSTR WINAPI StrCatBuffW(LPWSTR,LPCWSTR,INT);
731 #define StrCatBuff WINELIB_NAME_AW(StrCatBuff)
732
733 DWORD WINAPI StrCatChainW(LPWSTR,DWORD,DWORD,LPCWSTR);
734
735 LPSTR WINAPI StrChrA(LPCSTR,WORD);
736 LPWSTR WINAPI StrChrW(LPCWSTR,WCHAR);
737 #define StrChr WINELIB_NAME_AW(StrChr)
738
739 LPSTR WINAPI StrChrIA(LPCSTR,WORD);
740 LPWSTR WINAPI StrChrIW(LPCWSTR,WCHAR);
741 #define StrChrI WINELIB_NAME_AW(StrChrI)
742
743 #define StrCmpA lstrcmpA
744 int WINAPI StrCmpW(LPCWSTR,LPCWSTR);
745 #define StrCmp WINELIB_NAME_AW(StrCmp)
746
747 #define StrCmpIA lstrcmpiA
748 int WINAPI StrCmpIW(LPCWSTR,LPCWSTR);
749 #define StrCmpI WINELIB_NAME_AW(StrCmpI)
750
751 #define StrCpyA lstrcpyA
752 LPWSTR WINAPI StrCpyW(LPWSTR,LPCWSTR);
753 #define StrCpy WINELIB_NAME_AW(StrCpy)
754
755 #define StrCpyNA lstrcpynA
756 LPWSTR WINAPI StrCpyNW(LPWSTR,LPCWSTR,int);
757 #define StrCpyN WINELIB_NAME_AW(StrCpyN)
758 #define StrNCpy WINELIB_NAME_AW(StrCpyN)
759
760 INT WINAPI StrCmpLogicalW(LPCWSTR,LPCWSTR);
761
762 INT WINAPI StrCmpNA(LPCSTR,LPCSTR,INT);
763 INT WINAPI StrCmpNW(LPCWSTR,LPCWSTR,INT);
764 #define StrCmpN WINELIB_NAME_AW(StrCmpN)
765 #define StrNCmp WINELIB_NAME_AW(StrCmpN)
766
767 INT WINAPI StrCmpNIA(LPCSTR,LPCSTR,INT);
768 INT WINAPI StrCmpNIW(LPCWSTR,LPCWSTR,INT);
769 #define StrCmpNI WINELIB_NAME_AW(StrCmpNI)
770 #define StrNCmpI WINELIB_NAME_AW(StrCmpNI)
771
772 LPSTR WINAPI StrDupA(LPCSTR);
773 LPWSTR WINAPI StrDupW(LPCWSTR);
774 #define StrDup WINELIB_NAME_AW(StrDup)
775
776 HRESULT WINAPI SHStrDupA(LPCSTR,WCHAR**);
777 HRESULT WINAPI SHStrDupW(LPCWSTR,WCHAR**);
778 #define SHStrDup WINELIB_NAME_AW(SHStrDup)
779
780 LPSTR WINAPI StrFormatByteSizeA (DWORD,LPSTR,UINT);
781
782 /* A/W Pairing is broken for this function */
783 LPSTR WINAPI StrFormatByteSize64A (LONGLONG,LPSTR,UINT);
784 LPWSTR WINAPI StrFormatByteSizeW (LONGLONG,LPWSTR,UINT);
785 #ifndef __WINESRC__
786 #ifdef UNICODE
787 #define StrFormatByteSize StrFormatByteSizeW
788 #else
789 #define StrFormatByteSize StrFormatByteSize64A
790 #endif
791 #endif
792
793 LPSTR WINAPI StrFormatKBSizeA(LONGLONG,LPSTR,UINT);
794 LPWSTR WINAPI StrFormatKBSizeW(LONGLONG,LPWSTR,UINT);
795 #define StrFormatKBSize WINELIB_NAME_AW(StrFormatKBSize)
796
797 int WINAPI StrFromTimeIntervalA(LPSTR,UINT,DWORD,int);
798 int WINAPI StrFromTimeIntervalW(LPWSTR,UINT,DWORD,int);
799 #define StrFromTimeInterval WINELIB_NAME_AW(StrFromTimeInterval)
800
801 BOOL WINAPI StrIsIntlEqualA(BOOL,LPCSTR,LPCSTR,int);
802 BOOL WINAPI StrIsIntlEqualW(BOOL,LPCWSTR,LPCWSTR,int);
803 #define StrIsIntlEqual WINELIB_NAME_AW(StrIsIntlEqual)
804
805 #define StrIntlEqNA(a,b,c) StrIsIntlEqualA(TRUE,a,b,c)
806 #define StrIntlEqNW(a,b,c) StrIsIntlEqualW(TRUE,a,b,c)
807
808 #define StrIntlEqNIA(a,b,c) StrIsIntlEqualA(FALSE,a,b,c)
809 #define StrIntlEqNIW(a,b,c) StrIsIntlEqualW(FALSE,a,b,c)
810
811 LPSTR  WINAPI StrNCatA(LPSTR,LPCSTR,int);
812 LPWSTR WINAPI StrNCatW(LPWSTR,LPCWSTR,int);
813 #define StrNCat WINELIB_NAME_AW(StrNCat)
814 #define StrCatN WINELIB_NAME_AW(StrNCat)
815
816 LPSTR  WINAPI StrPBrkA(LPCSTR,LPCSTR);
817 LPWSTR WINAPI StrPBrkW(LPCWSTR,LPCWSTR);
818 #define StrPBrk WINELIB_NAME_AW(StrPBrk)
819
820 LPSTR  WINAPI StrRChrA(LPCSTR,LPCSTR,WORD);
821 LPWSTR WINAPI StrRChrW(LPCWSTR,LPCWSTR,WORD);
822 #define StrRChr WINELIB_NAME_AW(StrRChr)
823
824 LPSTR  WINAPI StrRChrIA(LPCSTR,LPCSTR,WORD);
825 LPWSTR WINAPI StrRChrIW(LPCWSTR,LPCWSTR,WORD);
826 #define StrRChrI WINELIB_NAME_AW(StrRChrI)
827
828 LPSTR  WINAPI StrRStrIA(LPCSTR,LPCSTR,LPCSTR);
829 LPWSTR WINAPI StrRStrIW(LPCWSTR,LPCWSTR,LPCWSTR);
830 #define StrRStrI WINELIB_NAME_AW(StrRStrI)
831
832 int WINAPI StrSpnA(LPCSTR,LPCSTR);
833 int WINAPI StrSpnW(LPCWSTR,LPCWSTR);
834 #define StrSpn WINELIB_NAME_AW(StrSpn)
835
836 LPSTR  WINAPI StrStrA(LPCSTR,LPCSTR);
837 LPWSTR WINAPI StrStrW(LPCWSTR,LPCWSTR);
838 #define StrStr WINELIB_NAME_AW(StrStr)
839
840 LPSTR  WINAPI StrStrIA(LPCSTR,LPCSTR);
841 LPWSTR WINAPI StrStrIW(LPCWSTR,LPCWSTR);
842 #define StrStrI WINELIB_NAME_AW(StrStrI)
843
844 int WINAPI StrToIntA(LPCSTR);
845 int WINAPI StrToIntW(LPCWSTR);
846 #define StrToInt WINELIB_NAME_AW(StrToInt)
847 #define StrToLong WINELIB_NAME_AW(StrToInt)
848
849 BOOL WINAPI StrToIntExA(LPCSTR,DWORD,int*);
850 BOOL WINAPI StrToIntExW(LPCWSTR,DWORD,int*);
851 #define StrToIntEx WINELIB_NAME_AW(StrToIntEx)
852
853 BOOL WINAPI StrToInt64ExA(LPCSTR,DWORD,LONGLONG*);
854 BOOL WINAPI StrToInt64ExW(LPCWSTR,DWORD,LONGLONG*);
855 #define StrToIntEx64 WINELIB_NAME_AW(StrToIntEx64)
856
857 BOOL WINAPI StrTrimA(LPSTR,LPCSTR);
858 BOOL WINAPI StrTrimW(LPWSTR,LPCWSTR);
859 #define StrTrim WINELIB_NAME_AW(StrTrim)
860
861 INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,va_list);
862 INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,va_list);
863 #define wvnsprintf WINELIB_NAME_AW(wvnsprintf)
864
865 INT WINAPIV wnsprintfA(LPSTR,INT,LPCSTR, ...);
866 INT WINAPIV wnsprintfW(LPWSTR,INT,LPCWSTR, ...);
867 #define wnsprintf WINELIB_NAME_AW(wnsprintf)
868
869 HRESULT WINAPI SHLoadIndirectString(LPCWSTR,LPWSTR,UINT,PVOID*);
870
871 BOOL WINAPI IntlStrEqWorkerA(BOOL,LPCSTR,LPCSTR,int);
872 BOOL WINAPI IntlStrEqWorkerW(BOOL,LPCWSTR,LPCWSTR,int);
873 #define IntlStrEqWorker WINELIB_NAME_AW(IntlStrEqWorker)
874
875 #define IntlStrEqNA(s1,s2,n) IntlStrEqWorkerA(TRUE,s1,s2,n)
876 #define IntlStrEqNW(s1,s2,n) IntlStrEqWorkerW(TRUE,s1,s2,n)
877 #define IntlStrEqN WINELIB_NAME_AW(IntlStrEqN)
878
879 #define IntlStrEqNIA(s1,s2,n) IntlStrEqWorkerA(FALSE,s1,s2,n)
880 #define IntlStrEqNIW(s1,s2,n) IntlStrEqWorkerW(FALSE,s1,s2,n)
881 #define IntlStrEqNI WINELIB_NAME_AW(IntlStrEqNI)
882
883 HRESULT WINAPI StrRetToStrA(STRRET*,LPCITEMIDLIST,LPSTR*);
884 HRESULT WINAPI StrRetToStrW(STRRET*,LPCITEMIDLIST,LPWSTR*);
885 #define StrRetToStr WINELIB_NAME_AW(StrRetToStr)
886
887 HRESULT WINAPI StrRetToBufA(STRRET*,LPCITEMIDLIST,LPSTR,UINT);
888 HRESULT WINAPI StrRetToBufW(STRRET*,LPCITEMIDLIST,LPWSTR,UINT);
889 #define StrRetToBuf WINELIB_NAME_AW(StrRetToBuf)
890
891 HRESULT WINAPI StrRetToBSTR(STRRET*,LPCITEMIDLIST,BSTR*);
892
893 #endif /* NO_SHLWAPI_STRFCNS */
894
895
896 /* GDI functions */
897 #ifndef NO_SHLWAPI_GDI
898
899 HPALETTE WINAPI SHCreateShellPalette(HDC);
900
901 COLORREF WINAPI ColorHLSToRGB(WORD,WORD,WORD);
902
903 COLORREF WINAPI ColorAdjustLuma(COLORREF,int,BOOL);
904
905 VOID WINAPI ColorRGBToHLS(COLORREF,LPWORD,LPWORD,LPWORD);
906
907 #endif /* NO_SHLWAPI_GDI */
908
909
910 /* Stream functions */
911 #ifndef NO_SHLWAPI_STREAM
912
913 struct IStream * WINAPI SHOpenRegStreamA(HKEY,LPCSTR,LPCSTR,DWORD);
914 struct IStream * WINAPI SHOpenRegStreamW(HKEY,LPCWSTR,LPCWSTR,DWORD);
915 #define SHOpenRegStream WINELIB_NAME_AW(SHOpenRegStream2) /* Uses version 2 */
916
917 struct IStream * WINAPI SHOpenRegStream2A(HKEY,LPCSTR,LPCSTR,DWORD);
918 struct IStream * WINAPI SHOpenRegStream2W(HKEY,LPCWSTR,LPCWSTR,DWORD);
919 #define SHOpenRegStream2 WINELIB_NAME_AW(SHOpenRegStream2)
920
921 HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR,DWORD,struct IStream**);
922 HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR,DWORD,struct IStream**);
923 #define SHCreateStreamOnFile WINELIB_NAME_AW(SHCreateStreamOnFile)
924
925 HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR,DWORD,DWORD,BOOL,struct IStream*,struct IStream**);
926
927 HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct IStream**);
928
929 #endif /* NO_SHLWAPI_STREAM */
930
931 /* SHAutoComplete flags */
932 #define SHACF_DEFAULT               0x00000000
933 #define SHACF_FILESYSTEM            0x00000001
934 #define SHACF_URLHISTORY            0x00000002
935 #define SHACF_URLMRU                0x00000004
936 #define SHACF_URLALL                (SHACF_URLHISTORY|SHACF_URLMRU)
937 #define SHACF_USETAB                0x00000008
938 #define SHACF_FILESYS_ONLY          0x00000010
939 #define SHACF_FILESYS_DIRS          0x00000020
940 #define SHACF_AUTOSUGGEST_FORCE_ON  0x10000000
941 #define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000
942 #define SHACF_AUTOAPPEND_FORCE_ON   0x40000000
943 #define SHACF_AUTOAPPEND_FORCE_OFF  0x80000000
944
945 HRESULT WINAPI SHAutoComplete(HWND,DWORD);
946
947 /* Threads */
948 HRESULT WINAPI SHGetThreadRef(IUnknown**);
949 HRESULT WINAPI SHSetThreadRef(IUnknown*);
950 HRESULT WINAPI SHReleaseThreadRef(void);
951
952 /* SHCreateThread flags */
953 #define CTF_INSIST          0x01 /* Always call */
954 #define CTF_THREAD_REF      0x02 /* Hold thread ref */
955 #define CTF_PROCESS_REF     0x04 /* Hold process ref */
956 #define CTF_COINIT          0x08 /* Startup COM first */
957 #define CTF_FREELIBANDEXIT  0x10 /* Hold DLL ref */
958 #define CTF_REF_COUNTED     0x20 /* Thread is ref counted */
959 #define CTF_WAIT_ALLOWCOM   0x40 /* Allow marshalling */
960
961 BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE,void*,DWORD,LPTHREAD_START_ROUTINE);
962
963 BOOL WINAPI SHSkipJunction(struct IBindCtx*,const CLSID*);
964
965 /* Version Information */
966
967 typedef struct _DllVersionInfo {
968     DWORD cbSize;
969     DWORD dwMajorVersion;
970     DWORD dwMinorVersion;
971     DWORD dwBuildNumber;
972     DWORD dwPlatformID;
973 } DLLVERSIONINFO;
974
975 #define DLLVER_PLATFORM_WINDOWS 0x01 /* Win9x */
976 #define DLLVER_PLATFORM_NT      0x02 /* WinNT */
977
978 typedef HRESULT (CALLBACK *DLLGETVERSIONPROC)(DLLVERSIONINFO *);
979
980 #ifdef __WINESRC__
981 /* shouldn't be here, but is nice for type checking */
982 HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *) DECLSPEC_HIDDEN;
983 #endif
984
985 typedef struct _DLLVERSIONINFO2 {
986     DLLVERSIONINFO info1;
987     DWORD          dwFlags;    /* Reserved */
988     ULONGLONG DECLSPEC_ALIGN(8) ullVersion; /* 16 bits each for Major, Minor, Build, QFE */
989 } DLLVERSIONINFO2;
990
991 #define DLLVER_MAJOR_MASK 0xFFFF000000000000
992 #define DLLVER_MINOR_MASK 0x0000FFFF00000000
993 #define DLLVER_BUILD_MASK 0x00000000FFFF0000
994 #define DLLVER_QFE_MASK   0x000000000000FFFF
995
996 #define MAKEDLLVERULL(mjr, mnr, bld, qfe) (((ULONGLONG)(mjr)<< 48)| \
997   ((ULONGLONG)(mnr)<< 32) | ((ULONGLONG)(bld)<< 16) | (ULONGLONG)(qfe))
998
999 HRESULT WINAPI DllInstall(BOOL,LPCWSTR) DECLSPEC_HIDDEN;
1000
1001
1002 /* IsOS definitions */
1003
1004 #define OS_WIN32SORGREATER        0x00
1005 #define OS_NT                     0x01
1006 #define OS_WIN95ORGREATER         0x02
1007 #define OS_NT4ORGREATER           0x03
1008 #define OS_WIN2000ORGREATER_ALT   0x04
1009 #define OS_WIN98ORGREATER         0x05
1010 #define OS_WIN98_GOLD             0x06
1011 #define OS_WIN2000ORGREATER       0x07
1012 #define OS_WIN2000PRO             0x08
1013 #define OS_WIN2000SERVER          0x09
1014 #define OS_WIN2000ADVSERVER       0x0A
1015 #define OS_WIN2000DATACENTER      0x0B
1016 #define OS_WIN2000TERMINAL        0x0C
1017 #define OS_EMBEDDED               0x0D
1018 #define OS_TERMINALCLIENT         0x0E
1019 #define OS_TERMINALREMOTEADMIN    0x0F
1020 #define OS_WIN95_GOLD             0x10
1021 #define OS_MEORGREATER            0x11
1022 #define OS_XPORGREATER            0x12
1023 #define OS_HOME                   0x13
1024 #define OS_PROFESSIONAL           0x14
1025 #define OS_DATACENTER             0x15
1026 #define OS_ADVSERVER              0x16
1027 #define OS_SERVER                 0x17
1028 #define OS_TERMINALSERVER         0x18
1029 #define OS_PERSONALTERMINALSERVER 0x19
1030 #define OS_FASTUSERSWITCHING      0x1A
1031 #define OS_WELCOMELOGONUI         0x1B
1032 #define OS_DOMAINMEMBER           0x1C
1033 #define OS_ANYSERVER              0x1D
1034 #define OS_WOW6432                0x1E
1035 #define OS_WEBSERVER              0x1F
1036 #define OS_SMALLBUSINESSSERVER    0x20
1037 #define OS_TABLETPC               0x21
1038 #define OS_SERVERADMINUI          0x22
1039 #define OS_MEDIACENTER            0x23
1040 #define OS_APPLIANCE              0x24
1041
1042 BOOL WINAPI IsOS(DWORD);
1043
1044 #include <poppack.h> 
1045
1046 #ifdef __cplusplus
1047 } /* extern "C" */
1048 #endif /* defined(__cplusplus) */
1049
1050 #endif /* __WINE_SHLWAPI_H */