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