1 /***********************************************************************\
2 *                               shlwapi.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.shlwapi;
11 version(Windows):
12 pragma(lib, "shlwapi");
13 
14 /* Changes compared to MinGW:
15 wnsprintf functions are not included.
16 // Macros unneeded for D
17 #define StrCmpIA lstrcmpiA;
18 #define StrCmpA lstrcmpA;
19 #define StrCpyA lstrcpyA;
20 #define StrCpyNA lstrcpynA;
21 #define MAKEDLLVERULL(major, minor, build, qfe) \
22         (((ULONGLONG)(major) << 48) | \
23          ((ULONGLONG)(minor) << 32) | \
24          ((ULONGLONG)(build) << 16) | \
25          ((ULONGLONG)(  qfe) <<  0))
26 */
27 
28 import win32.objbase, win32.shlobj;
29 private import win32.basetyps, win32.objidl, win32.unknwn, win32.windef,
30   win32.winbase, win32.winreg;
31 
32 const DLLVER_PLATFORM_WINDOWS = 0x00000001;
33 const DLLVER_PLATFORM_NT      = 0x00000002;
34 
35 const URL_DONT_ESCAPE_EXTRA_INFO  = 0x02000000;
36 const URL_DONT_SIMPLIFY           = 0x08000000;
37 const URL_ESCAPE_PERCENT          = 0x00001000;
38 const URL_ESCAPE_SEGMENT_ONLY     = 0x00002000;
39 const URL_ESCAPE_SPACES_ONLY      = 0x04000000;
40 const URL_ESCAPE_UNSAFE           = 0x20000000;
41 const URL_INTERNAL_PATH           = 0x00800000;
42 const URL_PARTFLAG_KEEPSCHEME     = 0x00000001;
43 const URL_PLUGGABLE_PROTOCOL      = 0x40000000;
44 const URL_UNESCAPE                = 0x10000000;
45 const URL_UNESCAPE_HIGH_ANSI_ONLY = 0x00400000;
46 const URL_UNESCAPE_INPLACE        = 0x00100000;
47 
48 align(1):
49 struct DLLVERSIONINFO
50 {
51 	DWORD cbSize = this.sizeof;
52 	DWORD dwMajorVersion;
53 	DWORD dwMinorVersion;
54 	DWORD dwBuildNumber;
55 	DWORD dwPlatformID;
56 }
57 
58 struct DLLVERSIONINFO2
59 {
60 	DLLVERSIONINFO info1;
61 	DWORD dwFlags;
62 	ULONGLONG ullVersion;
63 }
64 
65 enum ASSOCSTR {
66 	ASSOCSTR_COMMAND,
67 	ASSOCSTR_EXECUTABLE,
68 	ASSOCSTR_FRIENDLYDOCNAME,
69 	ASSOCSTR_FRIENDLYAPPNAME,
70 	ASSOCSTR_NOOPEN,
71 	ASSOCSTR_SHELLNEWVALUE,
72 	ASSOCSTR_DDECOMMAND,
73 	ASSOCSTR_DDEIFEXEC,
74 	ASSOCSTR_DDEAPPLICATION,
75 	ASSOCSTR_DDETOPIC
76 }
77 
78 enum ASSOCKEY
79 {
80 	ASSOCKEY_SHELLEXECCLASS = 1,
81 	ASSOCKEY_APP,
82 	ASSOCKEY_CLASS,
83 	ASSOCKEY_BASECLASS
84 }
85 
86 enum ASSOCDATA
87 {
88 	ASSOCDATA_MSIDESCRIPTOR = 1,
89 	ASSOCDATA_NOACTIVATEHANDLER,
90 	ASSOCDATA_QUERYCLASSSTORE
91 }
92 
93 alias DWORD ASSOCF;
94 
95 enum SHREGDEL_FLAGS
96 {
97 	SHREGDEL_DEFAULT = 0x00000000,
98 	SHREGDEL_HKCU    = 0x00000001,
99 	SHREGDEL_HKLM    = 0x00000010,
100 	SHREGDEL_BOTH    = 0x00000011
101 }
102 
103 enum SHREGENUM_FLAGS
104 {
105 	SHREGENUM_DEFAULT = 0x00000000,
106 	SHREGENUM_HKCU    = 0x00000001,
107 	SHREGENUM_HKLM    = 0x00000010,
108 	SHREGENUM_BOTH    = 0x00000011
109 }
110 
111 enum URLIS
112 {
113 	URLIS_URL,
114 	URLIS_OPAQUE,
115 	URLIS_NOHISTORY,
116 	URLIS_FILEURL,
117 	URLIS_APPLIABLE,
118 	URLIS_DIRECTORY,
119 	URLIS_HASQUERY
120 }
121 
122 mixin DECLARE_HANDLE!("HUSKEY");
123 alias HUSKEY* PHUSKEY;
124 
125 extern (Windows)
126 {
127 	alias HRESULT function (DLLVERSIONINFO *) DLLGETVERSIONPROC;
128 }
129 
130 
131 BOOL IntlStrEqNA(LPCSTR pStr1, LPCSTR pStr2, int nChar)
132 {
133 	return IntlStrEqWorkerA(TRUE, pStr1, pStr2, nChar);
134 }
135 
136 BOOL IntlStrEqNW(LPCWSTR pStr1, LPCWSTR pStr2, int nChar)
137 {
138 	return IntlStrEqWorkerW(TRUE, pStr1, pStr2, nChar);
139 }
140 
141 BOOL IntlStrEqNIA(LPCSTR pStr1, LPCSTR pStr2, int nChar)
142 {
143 	return IntlStrEqWorkerA(FALSE, pStr1, pStr2, nChar);
144 }
145 
146 BOOL IntlStrEqNIW(LPCWSTR pStr1, LPCWSTR pStr2, int nChar)
147 {
148 	return IntlStrEqWorkerW(FALSE, pStr1, pStr2, nChar);
149 }
150 
151 BOOL UrlIsFileUrlA(LPCSTR pszURL)
152 {
153 	return UrlIsA(pszURL, URLIS.URLIS_FILEURL);
154 }
155 
156 BOOL UrlIsFileUrlW(LPCWSTR pszURL)
157 {
158 	return UrlIsW(pszURL, URLIS.URLIS_FILEURL);
159 }
160 
161 HRESULT UrlUnescapeInPlaceA(LPSTR pszUrl, DWORD dwFlags)
162 {
163 	return UrlUnescapeA(pszUrl, null, null, dwFlags | URL_UNESCAPE_INPLACE);
164 }
165 HRESULT UrlUnescapeInPlaceW(LPWSTR pszUrl, DWORD dwFlags)
166 {
167 	return UrlUnescapeW(pszUrl, null, null, dwFlags | URL_UNESCAPE_INPLACE);
168 }
169 
170 extern (Windows):
171 BOOL ChrCmpIA(WORD, WORD);
172 BOOL ChrCmpIW(WCHAR, WCHAR);
173 BOOL IntlStrEqWorkerA(BOOL, LPCSTR, LPCSTR, int);
174 BOOL IntlStrEqWorkerW(BOOL, LPCWSTR, LPCWSTR, int);
175 HRESULT SHStrDupA(LPCSTR, LPWSTR*);
176 HRESULT SHStrDupW(LPCWSTR, LPWSTR*);
177 LPSTR StrCatA(LPSTR, LPCSTR);
178 LPWSTR StrCatW(LPWSTR, LPCWSTR);
179 LPSTR StrCatBuffA(LPSTR, LPCSTR, int);
180 LPWSTR StrCatBuffW(LPWSTR, LPCWSTR, int);
181 DWORD StrCatChainW(LPWSTR, DWORD, DWORD, LPCWSTR);
182 LPSTR StrChrA(LPCSTR, WORD);
183 LPWSTR StrChrW(LPCWSTR, WCHAR);
184 LPSTR StrChrIA(LPCSTR, WORD);
185 LPWSTR StrChrIW(LPCWSTR, WCHAR);
186 int StrCmpIW(LPCWSTR, LPCWSTR);
187 int StrCmpW(LPCWSTR, LPCWSTR);
188 LPWSTR StrCpyW(LPWSTR, LPCWSTR);
189 LPWSTR StrCpyNW(LPWSTR, LPCWSTR, int);
190 int StrCmpNA(LPCSTR, LPCSTR, int);
191 int StrCmpNW(LPCWSTR, LPCWSTR, int);
192 int StrCmpNIA(LPCSTR, LPCSTR, int);
193 int StrCmpNIW(LPCWSTR, LPCWSTR, int);
194 int StrCSpnA(LPCSTR, LPCSTR);
195 int StrCSpnW(LPCWSTR, LPCWSTR);
196 int StrCSpnIA(LPCSTR, LPCSTR);
197 int StrCSpnIW(LPCWSTR, LPCWSTR);
198 LPSTR StrDupA(LPCSTR);
199 LPWSTR StrDupW(LPCWSTR);
200 LPSTR StrFormatByteSize64A(LONGLONG, LPSTR, UINT);
201 LPSTR StrFormatByteSizeA(DWORD, LPSTR, UINT);
202 LPWSTR StrFormatByteSizeW(LONGLONG, LPWSTR, UINT);
203 LPSTR StrFormatKBSizeA(LONGLONG, LPSTR, UINT);
204 LPWSTR StrFormatKBSizeW(LONGLONG, LPWSTR, UINT);
205 int StrFromTimeIntervalA(LPSTR, UINT, DWORD, int);
206 int StrFromTimeIntervalW(LPWSTR, UINT, DWORD, int);
207 BOOL StrIsIntlEqualA(BOOL, LPCSTR, LPCSTR, int);
208 BOOL StrIsIntlEqualW(BOOL, LPCWSTR, LPCWSTR, int);
209 LPSTR StrNCatA(LPSTR, LPCSTR, int);
210 LPWSTR StrNCatW(LPWSTR, LPCWSTR, int);
211 LPSTR StrPBrkA(LPCSTR, LPCSTR);
212 LPWSTR StrPBrkW(LPCWSTR, LPCWSTR);
213 LPSTR StrRChrA(LPCSTR, LPCSTR, WORD);
214 LPWSTR StrRChrW(LPCWSTR, LPCWSTR, WCHAR);
215 LPSTR StrRChrIA(LPCSTR, LPCSTR, WORD);
216 LPWSTR StrRChrIW(LPCWSTR, LPCWSTR, WCHAR);
217 LPSTR StrRStrIA(LPCSTR, LPCSTR, LPCSTR);
218 LPWSTR StrRStrIW(LPCWSTR, LPCWSTR, LPCWSTR);
219 int StrSpnA(LPCSTR, LPCSTR);
220 int StrSpnW(LPCWSTR, LPCWSTR);
221 LPSTR StrStrA(LPCSTR, LPCSTR);
222 LPSTR StrStrIA(LPCSTR, LPCSTR);
223 LPWSTR StrStrIW(LPCWSTR, LPCWSTR);
224 LPWSTR StrStrW(LPCWSTR, LPCWSTR);
225 int StrToIntA(LPCSTR);
226 int StrToIntW(LPCWSTR);
227 BOOL StrToIntExA(LPCSTR, DWORD, int*);
228 BOOL StrToIntExW(LPCWSTR, DWORD, int*);
229 BOOL StrTrimA(LPSTR, LPCSTR);
230 BOOL StrTrimW(LPWSTR, LPCWSTR);
231 LPSTR PathAddBackslashA(LPSTR);
232 LPWSTR PathAddBackslashW(LPWSTR);
233 BOOL PathAddExtensionA(LPSTR, LPCSTR);
234 BOOL PathAddExtensionW(LPWSTR, LPCWSTR);
235 BOOL PathAppendA(LPSTR, LPCSTR);
236 BOOL PathAppendW(LPWSTR, LPCWSTR);
237 LPSTR PathBuildRootA(LPSTR, int);
238 LPWSTR PathBuildRootW(LPWSTR, int);
239 BOOL PathCanonicalizeA(LPSTR, LPCSTR);
240 BOOL PathCanonicalizeW(LPWSTR, LPCWSTR);
241 LPSTR PathCombineA(LPSTR, LPCSTR, LPCSTR);
242 LPWSTR PathCombineW(LPWSTR, LPCWSTR, LPCWSTR);
243 int PathCommonPrefixA(LPCSTR, LPCSTR, LPSTR);
244 int PathCommonPrefixW(LPCWSTR, LPCWSTR, LPWSTR);
245 BOOL PathCompactPathA(HDC, LPSTR, UINT);
246 BOOL PathCompactPathW(HDC, LPWSTR, UINT);
247 BOOL PathCompactPathExA(LPSTR, LPCSTR, UINT, DWORD);
248 BOOL PathCompactPathExW(LPWSTR, LPCWSTR, UINT, DWORD);
249 HRESULT PathCreateFromUrlA(LPCSTR, LPSTR, LPDWORD, DWORD);
250 HRESULT PathCreateFromUrlW(LPCWSTR, LPWSTR, LPDWORD, DWORD);
251 BOOL PathFileExistsA(LPCSTR);
252 BOOL PathFileExistsW(LPCWSTR);
253 LPSTR PathFindExtensionA(LPCSTR);
254 LPWSTR PathFindExtensionW(LPCWSTR);
255 LPSTR PathFindFileNameA(LPCSTR);
256 LPWSTR PathFindFileNameW(LPCWSTR);
257 LPSTR PathFindNextComponentA(LPCSTR);
258 LPWSTR PathFindNextComponentW(LPCWSTR);
259 BOOL PathFindOnPathA(LPSTR, LPCSTR*);
260 BOOL PathFindOnPathW(LPWSTR, LPCWSTR*);
261 LPCSTR PathFindSuffixArrayA(LPCSTR, LPCSTR*, int);
262 LPCWSTR PathFindSuffixArrayW(LPCWSTR, LPCWSTR*, int);
263 LPSTR PathGetArgsA(LPCSTR);
264 LPWSTR PathGetArgsW(LPCWSTR);
265 UINT PathGetCharTypeA(UCHAR);
266 UINT PathGetCharTypeW(WCHAR);
267 int PathGetDriveNumberA(LPCSTR);
268 int PathGetDriveNumberW(LPCWSTR);
269 BOOL PathIsContentTypeA(LPCSTR, LPCSTR);
270 BOOL PathIsContentTypeW(LPCWSTR, LPCWSTR);
271 BOOL PathIsDirectoryA(LPCSTR);
272 BOOL PathIsDirectoryEmptyA(LPCSTR);
273 BOOL PathIsDirectoryEmptyW(LPCWSTR);
274 BOOL PathIsDirectoryW(LPCWSTR);
275 BOOL PathIsFileSpecA(LPCSTR);
276 BOOL PathIsFileSpecW(LPCWSTR);
277 BOOL PathIsLFNFileSpecA(LPCSTR);
278 BOOL PathIsLFNFileSpecW(LPCWSTR);
279 BOOL PathIsNetworkPathA(LPCSTR);
280 BOOL PathIsNetworkPathW(LPCWSTR);
281 BOOL PathIsPrefixA(LPCSTR, LPCSTR);
282 BOOL PathIsPrefixW(LPCWSTR, LPCWSTR);
283 BOOL PathIsRelativeA(LPCSTR);
284 BOOL PathIsRelativeW(LPCWSTR);
285 BOOL PathIsRootA(LPCSTR);
286 BOOL PathIsRootW(LPCWSTR);
287 BOOL PathIsSameRootA(LPCSTR, LPCSTR);
288 BOOL PathIsSameRootW(LPCWSTR, LPCWSTR);
289 BOOL PathIsSystemFolderA(LPCSTR, DWORD);
290 BOOL PathIsSystemFolderW(LPCWSTR, DWORD);
291 BOOL PathIsUNCA(LPCSTR);
292 BOOL PathIsUNCServerA(LPCSTR);
293 BOOL PathIsUNCServerShareA(LPCSTR);
294 BOOL PathIsUNCServerShareW(LPCWSTR);
295 BOOL PathIsUNCServerW(LPCWSTR);
296 BOOL PathIsUNCW(LPCWSTR);
297 BOOL PathIsURLA(LPCSTR);
298 BOOL PathIsURLW(LPCWSTR);
299 BOOL PathMakePrettyA(LPSTR);
300 BOOL PathMakePrettyW(LPWSTR);
301 BOOL PathMakeSystemFolderA(LPSTR);
302 BOOL PathMakeSystemFolderW(LPWSTR);
303 BOOL PathMatchSpecA(LPCSTR, LPCSTR);
304 BOOL PathMatchSpecW(LPCWSTR, LPCWSTR);
305 int PathParseIconLocationA(LPSTR);
306 int PathParseIconLocationW(LPWSTR);
307 void PathQuoteSpacesA(LPSTR);
308 void PathQuoteSpacesW(LPWSTR);
309 BOOL PathRelativePathToA(LPSTR, LPCSTR, DWORD, LPCSTR, DWORD);
310 BOOL PathRelativePathToW(LPWSTR, LPCWSTR, DWORD, LPCWSTR, DWORD);
311 void PathRemoveArgsA(LPSTR);
312 void PathRemoveArgsW(LPWSTR);
313 LPSTR PathRemoveBackslashA(LPSTR);
314 LPWSTR PathRemoveBackslashW(LPWSTR);
315 void PathRemoveBlanksA(LPSTR);
316 void PathRemoveBlanksW(LPWSTR);
317 void PathRemoveExtensionA(LPSTR);
318 void PathRemoveExtensionW(LPWSTR);
319 BOOL PathRemoveFileSpecA(LPSTR);
320 BOOL PathRemoveFileSpecW(LPWSTR);
321 BOOL PathRenameExtensionA(LPSTR, LPCSTR);
322 BOOL PathRenameExtensionW(LPWSTR, LPCWSTR);
323 BOOL PathSearchAndQualifyA(LPCSTR, LPSTR, UINT);
324 BOOL PathSearchAndQualifyW(LPCWSTR, LPWSTR, UINT);
325 void PathSetDlgItemPathA(HWND, int, LPCSTR);
326 void PathSetDlgItemPathW(HWND, int, LPCWSTR);
327 LPSTR PathSkipRootA(LPCSTR);
328 LPWSTR PathSkipRootW(LPCWSTR);
329 void PathStripPathA(LPSTR);
330 void PathStripPathW(LPWSTR);
331 BOOL PathStripToRootA(LPSTR);
332 BOOL PathStripToRootW(LPWSTR);
333 void PathUndecorateA(LPSTR);
334 void PathUndecorateW(LPWSTR);
335 BOOL PathUnExpandEnvStringsA(LPCSTR, LPSTR, UINT);
336 BOOL PathUnExpandEnvStringsW(LPCWSTR, LPWSTR, UINT);
337 BOOL PathUnmakeSystemFolderA(LPSTR);
338 BOOL PathUnmakeSystemFolderW(LPWSTR);
339 void PathUnquoteSpacesA(LPSTR);
340 void PathUnquoteSpacesW(LPWSTR);
341 HRESULT SHAutoComplete(HWND, DWORD);
342 BOOL SHCreateThread(LPTHREAD_START_ROUTINE, void*, DWORD, LPTHREAD_START_ROUTINE);
343 DWORD SHCopyKeyA(HKEY, LPCSTR, HKEY, DWORD);
344 DWORD SHCopyKeyW(HKEY, LPCWSTR, HKEY, DWORD);
345 DWORD SHDeleteEmptyKeyA(HKEY, LPCSTR);
346 DWORD SHDeleteEmptyKeyW(HKEY, LPCWSTR);
347 DWORD SHDeleteKeyA(HKEY, LPCSTR);
348 DWORD SHDeleteKeyW(HKEY, LPCWSTR);
349 DWORD SHEnumKeyExA(HKEY, DWORD, LPSTR, LPDWORD);
350 DWORD SHEnumKeyExW(HKEY, DWORD, LPWSTR, LPDWORD);
351 DWORD SHQueryInfoKeyA(HKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
352 DWORD SHQueryInfoKeyW(HKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
353 DWORD SHQueryValueExA(HKEY, LPCSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD);
354 DWORD SHQueryValueExW(HKEY, LPCWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD);
355 HRESULT SHGetThreadRef(IUnknown*);
356 HRESULT SHSetThreadRef(IUnknown);
357 BOOL SHSkipJunction(IBindCtx, const(CLSID)*);
358 DWORD SHEnumValueA(HKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD);
359 DWORD SHEnumValueW(HKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD);
360 DWORD SHGetValueA(HKEY, LPCSTR, LPCSTR, LPDWORD, LPVOID, LPDWORD);
361 DWORD SHGetValueW(HKEY, LPCWSTR, LPCWSTR, LPDWORD, LPVOID, LPDWORD);
362 DWORD SHSetValueA(HKEY, LPCSTR, LPCSTR, DWORD, LPCVOID, DWORD);
363 DWORD SHSetValueW(HKEY, LPCWSTR, LPCWSTR, DWORD, LPCVOID, DWORD);
364 DWORD SHDeleteValueA(HKEY, LPCSTR, LPCSTR);
365 DWORD SHDeleteValueW(HKEY, LPCWSTR, LPCWSTR);
366 HRESULT AssocCreate(CLSID, const(IID)* , const(LPVOID)*);
367 HRESULT AssocQueryKeyA(ASSOCF, ASSOCKEY, LPCSTR, LPCSTR, HKEY*);
368 HRESULT AssocQueryKeyW(ASSOCF, ASSOCKEY, LPCWSTR, LPCWSTR, HKEY*);
369 HRESULT AssocQueryStringA(ASSOCF, ASSOCSTR, LPCSTR, LPCSTR, LPSTR, DWORD*);
370 HRESULT AssocQueryStringByKeyA(ASSOCF, ASSOCSTR, HKEY, LPCSTR, LPSTR, DWORD*);
371 HRESULT AssocQueryStringByKeyW(ASSOCF, ASSOCSTR, HKEY, LPCWSTR, LPWSTR, DWORD*);
372 HRESULT AssocQueryStringW(ASSOCF, ASSOCSTR, LPCWSTR, LPCWSTR, LPWSTR, DWORD*);
373 HRESULT UrlApplySchemeA(LPCSTR, LPSTR, LPDWORD, DWORD);
374 HRESULT UrlApplySchemeW(LPCWSTR, LPWSTR, LPDWORD, DWORD);
375 HRESULT UrlCanonicalizeA(LPCSTR, LPSTR, LPDWORD, DWORD);
376 HRESULT UrlCanonicalizeW(LPCWSTR, LPWSTR, LPDWORD, DWORD);
377 HRESULT UrlCombineA(LPCSTR, LPCSTR, LPSTR, LPDWORD, DWORD);
378 HRESULT UrlCombineW(LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, DWORD);
379 int UrlCompareA(LPCSTR, LPCSTR, BOOL);
380 int UrlCompareW(LPCWSTR, LPCWSTR, BOOL);
381 HRESULT UrlCreateFromPathA(LPCSTR, LPSTR, LPDWORD, DWORD);
382 HRESULT UrlCreateFromPathW(LPCWSTR, LPWSTR, LPDWORD, DWORD);
383 HRESULT UrlEscapeA(LPCSTR, LPSTR, LPDWORD, DWORD);
384 HRESULT UrlEscapeW(LPCWSTR, LPWSTR, LPDWORD, DWORD);
385 LPCSTR UrlGetLocationA(LPCSTR);
386 LPCWSTR UrlGetLocationW(LPCWSTR);
387 HRESULT UrlGetPartA(LPCSTR, LPSTR, LPDWORD, DWORD, DWORD);
388 HRESULT UrlGetPartW(LPCWSTR, LPWSTR, LPDWORD, DWORD, DWORD);
389 HRESULT UrlHashA(LPCSTR, LPBYTE, DWORD);
390 HRESULT UrlHashW(LPCWSTR, LPBYTE, DWORD);
391 BOOL UrlIsA(LPCSTR, URLIS);
392 BOOL UrlIsW(LPCWSTR, URLIS);
393 BOOL UrlIsNoHistoryA(LPCSTR);
394 BOOL UrlIsNoHistoryW(LPCWSTR);
395 BOOL UrlIsOpaqueA(LPCSTR);
396 BOOL UrlIsOpaqueW(LPCWSTR);
397 HRESULT UrlUnescapeA(LPSTR, LPSTR, LPDWORD, DWORD);
398 HRESULT UrlUnescapeW(LPWSTR, LPWSTR, LPDWORD, DWORD);
399 DWORD SHRegCloseUSKey(HUSKEY);
400 LONG SHRegCreateUSKeyA(LPCSTR, REGSAM, HUSKEY, PHUSKEY, DWORD);
401 LONG SHRegCreateUSKeyW(LPCWSTR, REGSAM, HUSKEY, PHUSKEY, DWORD);
402 LONG SHRegDeleteEmptyUSKeyA(HUSKEY, LPCSTR, SHREGDEL_FLAGS);
403 LONG SHRegDeleteEmptyUSKeyW(HUSKEY, LPCWSTR, SHREGDEL_FLAGS);
404 LONG SHRegDeleteUSValueA(HUSKEY, LPCSTR, SHREGDEL_FLAGS);
405 LONG SHRegDeleteUSValueW(HUSKEY, LPCWSTR, SHREGDEL_FLAGS);
406 HKEY SHRegDuplicateHKey(HKEY);
407 DWORD SHRegEnumUSKeyA(HUSKEY, DWORD, LPSTR, LPDWORD, SHREGENUM_FLAGS);
408 DWORD SHRegEnumUSKeyW(HUSKEY, DWORD, LPWSTR, LPDWORD, SHREGENUM_FLAGS);
409 DWORD SHRegEnumUSValueA(HUSKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD, SHREGENUM_FLAGS);
410 DWORD SHRegEnumUSValueW(HUSKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD, SHREGENUM_FLAGS);
411 BOOL SHRegGetBoolUSValueA(LPCSTR, LPCSTR, BOOL, BOOL);
412 BOOL SHRegGetBoolUSValueW(LPCWSTR, LPCWSTR, BOOL, BOOL);
413 DWORD SHRegGetPathA(HKEY, LPCSTR, LPCSTR, LPSTR, DWORD);
414 DWORD SHRegGetPathW(HKEY, LPCWSTR, LPCWSTR, LPWSTR, DWORD);
415 LONG SHRegGetUSValueA(LPCSTR, LPCSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD);
416 LONG SHRegGetUSValueW(LPCWSTR, LPCWSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD);
417 LONG SHRegOpenUSKeyA(LPCSTR, REGSAM, HUSKEY, PHUSKEY, BOOL);
418 LONG SHRegOpenUSKeyW(LPCWSTR, REGSAM, HUSKEY, PHUSKEY, BOOL);
419 DWORD SHRegQueryInfoUSKeyA(HUSKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD, SHREGENUM_FLAGS);
420 DWORD SHRegQueryInfoUSKeyW(HUSKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD, SHREGENUM_FLAGS);
421 LONG SHRegQueryUSValueA(HUSKEY, LPCSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD);
422 LONG SHRegQueryUSValueW(HUSKEY, LPCWSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD);
423 DWORD SHRegSetPathA(HKEY, LPCSTR, LPCSTR, LPCSTR, DWORD);
424 DWORD SHRegSetPathW(HKEY, LPCWSTR, LPCWSTR, LPCWSTR, DWORD);
425 LONG SHRegSetUSValueA(LPCSTR, LPCSTR, DWORD, LPVOID, DWORD, DWORD);
426 LONG SHRegSetUSValueW(LPCWSTR, LPCWSTR, DWORD, LPVOID, DWORD, DWORD);
427 LONG SHRegWriteUSValueA(HUSKEY, LPCSTR, DWORD, LPVOID, DWORD, DWORD);
428 LONG SHRegWriteUSValueW(HUSKEY, LPCWSTR, DWORD, LPVOID, DWORD, DWORD);
429 HRESULT HashData(LPBYTE, DWORD, LPBYTE, DWORD);
430 HPALETTE SHCreateShellPalette(HDC);
431 COLORREF ColorHLSToRGB(WORD, WORD, WORD);
432 COLORREF ColorAdjustLuma(COLORREF, int, BOOL);
433 void ColorRGBToHLS(COLORREF, WORD*, WORD*, WORD*);
434 /** Should not be necessary for D?
435 extern (C):
436 int  wnsprintfA(LPSTR, int, LPCSTR, ...);
437 int  wnsprintfW(LPWSTR, int, LPCWSTR, ...);
438 extern (Windows):
439 int wvnsprintfA(LPSTR, int, LPCSTR, va_list);
440 int wvnsprintfW(LPWSTR, int, LPCWSTR, va_list);
441 */
442 
443 HINSTANCE MLLoadLibraryA(LPCSTR, HANDLE, DWORD, LPCSTR, BOOL);
444 HINSTANCE MLLoadLibraryW(LPCWSTR, HANDLE, DWORD, LPCWSTR, BOOL);
445 
446 HRESULT DllInstall(BOOL, LPCWSTR);
447 
448 HRESULT StrRetToBufA(LPSTRRET, LPCITEMIDLIST, LPSTR, UINT);
449 HRESULT StrRetToBufW(LPSTRRET, LPCITEMIDLIST, LPWSTR, UINT);
450 HRESULT StrRetToStrA(LPSTRRET, LPCITEMIDLIST, LPSTR*);
451 HRESULT StrRetToStrW(LPSTRRET, LPCITEMIDLIST, LPWSTR*);
452 HRESULT SHCreateStreamOnFileA(LPCSTR, DWORD, IStream*);
453 HRESULT SHCreateStreamOnFileW(LPCWSTR, DWORD, IStream*);
454 IStream SHOpenRegStream2A(HKEY, LPCSTR, LPCSTR, DWORD);
455 IStream SHOpenRegStream2W(HKEY, LPCWSTR, LPCWSTR, DWORD);
456 IStream SHOpenRegStreamA(HKEY, LPCSTR, LPCSTR, DWORD);
457 IStream SHOpenRegStreamW(HKEY, LPCWSTR, LPCWSTR, DWORD);
458 
459 version(Unicode) {
460 alias ChrCmpIW ChrCmpI;
461 alias IntlStrEqNW IntlStrEqN;
462 alias IntlStrEqNIW IntlStrEqNI;
463 alias IntlStrEqWorkerW IntlStrEqWorker;
464 alias SHStrDupW SHStrDup;
465 alias StrCatW StrCat;
466 alias StrCatBuffW StrCatBuff;
467 alias StrChrW StrChr;
468 alias StrChrIW StrChrI;
469 alias StrCmpW StrCmp;
470 alias StrCmpIW StrCmpI;
471 alias StrCmpNIW StrCmpNI;
472 alias StrCmpNW StrCmpN;
473 alias StrCpyNW StrCpyN;
474 alias StrCpyW StrCpy;
475 alias StrCSpnIW StrCSpnI;
476 alias StrCSpnW StrCSpn;
477 alias StrDupW StrDup;
478 alias StrFormatByteSizeW StrFormatByteSize;
479 alias StrFormatKBSizeW StrFormatKBSize;
480 alias StrFromTimeIntervalW StrFromTimeInterval;
481 alias StrIsIntlEqualW StrIsIntlEqual;
482 alias StrNCatW StrNCat;
483 alias StrPBrkW StrPBrk;
484 alias StrRChrW StrRChr;
485 alias StrRChrIW StrRChrI;
486 alias StrRetToBufW StrRetToBuf;
487 alias StrRetToStrW StrRetToStr;
488 alias StrRStrIW StrRStrI;
489 alias StrSpnW StrSpn;
490 alias StrStrIW StrStrI;
491 alias StrStrW StrStr;
492 alias StrToIntW StrToInt;
493 alias StrToIntExW StrToIntEx;
494 alias StrTrimW StrTrim;
495 alias PathAddBackslashW PathAddBackslash;
496 alias PathAddExtensionW PathAddExtension;
497 alias PathAppendW PathAppend;
498 alias PathBuildRootW PathBuildRoot;
499 alias PathCanonicalizeW PathCanonicalize;
500 alias PathCombineW PathCombine;
501 alias PathCommonPrefixW PathCommonPrefix;
502 alias PathCompactPathW PathCompactPath;
503 alias PathCompactPathExW PathCompactPathEx;
504 alias PathCreateFromUrlW PathCreateFromUrl;
505 alias PathFileExistsW PathFileExists;
506 alias PathFindExtensionW PathFindExtension;
507 alias PathFindFileNameW PathFindFileName;
508 alias PathFindNextComponentW PathFindNextComponent;
509 alias PathFindOnPathW PathFindOnPath;
510 alias PathFindSuffixArrayW PathFindSuffixArray;
511 alias PathGetArgsW PathGetArgs;
512 alias PathGetCharTypeW PathGetCharType;
513 alias PathGetDriveNumberW PathGetDriveNumber;
514 alias PathIsContentTypeW PathIsContentType;
515 alias PathIsDirectoryEmptyW PathIsDirectoryEmpty;
516 alias PathIsDirectoryW PathIsDirectory;
517 alias PathIsFileSpecW PathIsFileSpec;
518 alias PathIsLFNFileSpecW PathIsLFNFileSpec;
519 alias PathIsNetworkPathW PathIsNetworkPath;
520 alias PathIsPrefixW PathIsPrefix;
521 alias PathIsRelativeW PathIsRelative;
522 alias PathIsRootW PathIsRoot;
523 alias PathIsSameRootW PathIsSameRoot;
524 alias PathIsSystemFolderW PathIsSystemFolder;
525 alias PathIsUNCServerShareW PathIsUNCServerShare;
526 alias PathIsUNCServerW PathIsUNCServer;
527 alias PathIsUNCW PathIsUNC;
528 alias PathIsURLW PathIsURL;
529 alias PathMakePrettyW PathMakePretty;
530 alias PathMakeSystemFolderW PathMakeSystemFolder;
531 alias PathMatchSpecW PathMatchSpec;
532 alias PathParseIconLocationW PathParseIconLocation;
533 alias PathQuoteSpacesW PathQuoteSpaces;
534 alias PathRelativePathToW PathRelativePathTo;
535 alias PathRemoveArgsW PathRemoveArgs;
536 alias PathRemoveBackslashW PathRemoveBackslash;
537 alias PathRemoveBlanksW PathRemoveBlanks;
538 alias PathRemoveExtensionW PathRemoveExtension;
539 alias PathRemoveFileSpecW PathRemoveFileSpec;
540 alias PathRenameExtensionW PathRenameExtension;
541 alias PathSearchAndQualifyW PathSearchAndQualify;
542 alias PathSetDlgItemPathW PathSetDlgItemPath;
543 alias PathSkipRootW PathSkipRoot;
544 alias PathStripPathW PathStripPath;
545 alias PathStripToRootW PathStripToRoot;
546 alias PathUndecorateW PathUndecorate;
547 alias PathUnExpandEnvStringsW PathUnExpandEnvStrings;
548 alias PathUnmakeSystemFolderW PathUnmakeSystemFolder;
549 alias PathUnquoteSpacesW PathUnquoteSpaces;
550 alias SHCreateStreamOnFileW SHCreateStreamOnFile;
551 alias SHOpenRegStreamW SHOpenRegStream;
552 alias SHOpenRegStream2W SHOpenRegStream2;
553 alias SHCopyKeyW SHCopyKey;
554 alias SHDeleteEmptyKeyW SHDeleteEmptyKey;
555 alias SHDeleteKeyW SHDeleteKey;
556 alias SHEnumKeyExW SHEnumKeyEx;
557 alias SHQueryInfoKeyW SHQueryInfoKey;
558 alias SHQueryValueExW SHQueryValueEx;
559 alias SHEnumValueW SHEnumValue;
560 alias SHGetValueW SHGetValue;
561 alias SHSetValueW SHSetValue;
562 alias SHDeleteValueW SHDeleteValue;
563 alias AssocQueryKeyW AssocQueryKey;
564 alias AssocQueryStringByKeyW AssocQueryStringByKey;
565 alias AssocQueryStringW AssocQueryString;
566 alias UrlApplySchemeW UrlApplyScheme;
567 alias UrlCanonicalizeW UrlCanonicalize;
568 alias UrlCombineW UrlCombine;
569 alias UrlCompareW UrlCompare;
570 alias UrlCreateFromPathW UrlCreateFromPath;
571 alias UrlEscapeW UrlEscape;
572 alias UrlGetLocationW UrlGetLocation;
573 alias UrlGetPartW UrlGetPart;
574 alias UrlHashW UrlHash;
575 alias UrlIsW UrlIs;
576 alias UrlIsFileUrlW UrlIsFileUrl;
577 alias UrlIsNoHistoryW UrlIsNoHistory;
578 alias UrlIsOpaqueW UrlIsOpaque;
579 alias UrlUnescapeW UrlUnescape;
580 alias UrlUnescapeInPlaceW UrlUnescapeInPlace;
581 alias SHRegCreateUSKeyW SHRegCreateUSKey;
582 alias SHRegDeleteEmptyUSKeyW SHRegDeleteEmptyUSKey;
583 alias SHRegDeleteUSValueW SHRegDeleteUSValue;
584 alias SHRegEnumUSKeyW SHRegEnumUSKey;
585 alias SHRegEnumUSValueW SHRegEnumUSValue;
586 alias SHRegGetBoolUSValueW SHRegGetBoolUSValue;
587 alias SHRegGetPathW SHRegGetPath;
588 alias SHRegGetUSValueW SHRegGetUSValue;
589 alias SHRegOpenUSKeyW SHRegOpenUSKey;
590 alias SHRegQueryInfoUSKeyW SHRegQueryInfoUSKey;
591 alias SHRegQueryUSValueW SHRegQueryUSValue;
592 alias SHRegSetPathW SHRegSetPath;
593 alias SHRegSetUSValueW SHRegSetUSValue;
594 alias SHRegWriteUSValueW SHRegWriteUSValue;
595 //alias wnsprintfW wnsprintf;
596 //alias wvnsprintfW wvnsprintf;
597 } else {
598 alias ChrCmpIA ChrCmpI;
599 alias IntlStrEqNA IntlStrEqN;
600 alias IntlStrEqNIA IntlStrEqNI;
601 alias IntlStrEqWorkerA IntlStrEqWorker;
602 alias SHStrDupA SHStrDup;
603 alias StrCatBuffA StrCatBuff;
604 alias StrChrA StrChr;
605 alias StrChrIA StrChrI;
606 alias StrCmpNIA StrCmpNI;
607 alias StrCmpNA StrCmpN;
608 alias StrCSpnIA StrCSpnI;
609 alias StrCSpnA StrCSpn;
610 alias StrDupA StrDup;
611 alias StrFormatByteSizeA StrFormatByteSize;
612 alias StrFormatKBSizeA StrFormatKBSize;
613 alias StrFromTimeIntervalA StrFromTimeInterval;
614 alias StrIsIntlEqualA StrIsIntlEqual;
615 alias StrNCatA StrNCat;
616 alias StrPBrkA StrPBrk;
617 alias StrRChrA StrRChr;
618 alias StrRChrIA StrRChrI;
619 alias StrRetToBufA StrRetToBuf;
620 alias StrRetToStrA StrRetToStr;
621 alias StrRStrIA StrRStrI;
622 alias StrSpnA StrSpn;
623 alias StrStrIA StrStrI;
624 alias StrStrA StrStr;
625 alias StrToIntA StrToInt;
626 alias StrToIntExA StrToIntEx;
627 alias StrTrimA StrTrim;
628 alias PathAddBackslashA PathAddBackslash;
629 alias PathAddExtensionA PathAddExtension;
630 alias PathAppendA PathAppend;
631 alias PathBuildRootA PathBuildRoot;
632 alias PathCanonicalizeA PathCanonicalize;
633 alias PathCombineA PathCombine;
634 alias PathCommonPrefixA PathCommonPrefix;
635 alias PathCompactPathA PathCompactPath;
636 alias PathCompactPathExA PathCompactPathEx;
637 alias PathCreateFromUrlA PathCreateFromUrl;
638 alias PathFileExistsA PathFileExists;
639 alias PathFindExtensionA PathFindExtension;
640 alias PathFindFileNameA PathFindFileName;
641 alias PathFindNextComponentA PathFindNextComponent;
642 alias PathFindOnPathA PathFindOnPath;
643 alias PathFindSuffixArrayA PathFindSuffixArray;
644 alias PathGetArgsA PathGetArgs;
645 alias PathGetCharTypeA PathGetCharType;
646 alias PathGetDriveNumberA PathGetDriveNumber;
647 alias PathIsContentTypeA PathIsContentType;
648 alias PathIsDirectoryEmptyA PathIsDirectoryEmpty;
649 alias PathIsDirectoryA PathIsDirectory;
650 alias PathIsFileSpecA PathIsFileSpec;
651 alias PathIsLFNFileSpecA PathIsLFNFileSpec;
652 alias PathIsNetworkPathA PathIsNetworkPath;
653 alias PathIsPrefixA PathIsPrefix;
654 alias PathIsRelativeA PathIsRelative;
655 alias PathIsRootA PathIsRoot;
656 alias PathIsSameRootA PathIsSameRoot;
657 alias PathIsSystemFolderA PathIsSystemFolder;
658 alias PathIsUNCServerShareA PathIsUNCServerShare;
659 alias PathIsUNCServerA PathIsUNCServer;
660 alias PathIsUNCA PathIsUNC;
661 alias PathIsURLA PathIsURL;
662 alias PathMakePrettyA PathMakePretty;
663 alias PathMakeSystemFolderA PathMakeSystemFolder;
664 alias PathMatchSpecA PathMatchSpec;
665 alias PathParseIconLocationA PathParseIconLocation;
666 alias PathQuoteSpacesA PathQuoteSpaces;
667 alias PathRelativePathToA PathRelativePathTo;
668 alias PathRemoveArgsA PathRemoveArgs;
669 alias PathRemoveBackslashA PathRemoveBackslash;
670 alias PathRemoveBlanksA PathRemoveBlanks;
671 alias PathRemoveExtensionA PathRemoveExtension;
672 alias PathRemoveFileSpecA PathRemoveFileSpec;
673 alias PathRenameExtensionA PathRenameExtension;
674 alias PathSearchAndQualifyA PathSearchAndQualify;
675 alias PathSetDlgItemPathA PathSetDlgItemPath;
676 alias PathSkipRootA PathSkipRoot;
677 alias PathStripPathA PathStripPath;
678 alias PathStripToRootA PathStripToRoot;
679 alias PathUndecorateA PathUndecorate;
680 alias PathUnExpandEnvStringsA PathUnExpandEnvStrings;
681 alias PathUnmakeSystemFolderA PathUnmakeSystemFolder;
682 alias PathUnquoteSpacesA PathUnquoteSpaces;
683 alias SHCreateStreamOnFileA SHCreateStreamOnFile;
684 alias SHOpenRegStreamA SHOpenRegStream;
685 alias SHOpenRegStream2A SHOpenRegStream2;
686 alias SHCopyKeyA SHCopyKey;
687 alias SHDeleteEmptyKeyA SHDeleteEmptyKey;
688 alias SHDeleteKeyA SHDeleteKey;
689 alias SHEnumKeyExA SHEnumKeyEx;
690 alias SHQueryInfoKeyA SHQueryInfoKey;
691 alias SHQueryValueExA SHQueryValueEx;
692 alias SHEnumValueA SHEnumValue;
693 alias SHGetValueA SHGetValue;
694 alias SHSetValueA SHSetValue;
695 alias SHDeleteValueA SHDeleteValue;
696 alias AssocQueryKeyA AssocQueryKey;
697 alias AssocQueryStringByKeyA AssocQueryStringByKey;
698 alias AssocQueryStringA AssocQueryString;
699 alias UrlApplySchemeA UrlApplyScheme;
700 alias UrlCanonicalizeA UrlCanonicalize;
701 alias UrlCombineA UrlCombine;
702 alias UrlCompareA UrlCompare;
703 alias UrlCreateFromPathA UrlCreateFromPath;
704 alias UrlEscapeA UrlEscape;
705 alias UrlGetLocationA UrlGetLocation;
706 alias UrlGetPartA UrlGetPart;
707 alias UrlHashA UrlHash;
708 alias UrlIsA UrlIs;
709 alias UrlIsNoHistoryA UrlIsNoHistory;
710 alias UrlIsOpaqueA UrlIsOpaque;
711 alias UrlUnescapeA UrlUnescape;
712 alias UrlUnescapeInPlaceA UrlUnescapeInPlace;
713 alias SHRegCreateUSKeyA SHRegCreateUSKey;
714 alias SHRegDeleteEmptyUSKeyA SHRegDeleteEmptyUSKey;
715 alias SHRegDeleteUSValueA SHRegDeleteUSValue;
716 alias SHRegEnumUSKeyA SHRegEnumUSKey;
717 alias SHRegEnumUSValueA SHRegEnumUSValue;
718 alias SHRegGetBoolUSValueA SHRegGetBoolUSValue;
719 alias SHRegGetPathA SHRegGetPath;
720 alias SHRegGetUSValueA SHRegGetUSValue;
721 alias SHRegOpenUSKeyA SHRegOpenUSKey;
722 alias SHRegQueryInfoUSKeyA SHRegQueryInfoUSKey;
723 alias SHRegQueryUSValueA SHRegQueryUSValue;
724 alias SHRegSetPathA SHRegSetPath;
725 alias SHRegSetUSValueA SHRegSetUSValue;
726 alias SHRegWriteUSValueA SHRegWriteUSValue;
727 //alias wnsprintfA wnsprintf;
728 //alias wvnsprintfA wvnsprintf;
729 }
730 
731 alias StrToInt StrToLong;