4 * Many of this functions are in SHLWAPI.DLL also
9 #include "debugtools.h"
15 #include "shell32_main.h"
16 #include "wine/undocshell.h"
17 #include "wine/unicode.h"
20 DEFAULT_DEBUG_CHANNEL(shell);
22 #define isSlash(x) ((x)=='\\' || (x)=='/')
24 ########## Combining and Constructing paths ##########
27 /*************************************************************************
28 * PathAppendAW [SHELL32.36]
30 BOOL WINAPI PathAppendAW(
34 if (SHELL_OsIsUnicode())
35 return PathAppendW(lpszPath1, lpszPath2);
36 return PathAppendA(lpszPath1, lpszPath2);
39 /*************************************************************************
40 * PathCombineAW [SHELL32.37]
42 LPVOID WINAPI PathCombineAW(
47 if (SHELL_OsIsUnicode())
48 return PathCombineW( szDest, lpszDir, lpszFile );
49 return PathCombineA( szDest, lpszDir, lpszFile );
52 /*************************************************************************
53 * PathAddBackslashAW [SHELL32.32]
55 LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath)
57 if(SHELL_OsIsUnicode())
58 return PathAddBackslashW(lpszPath);
59 return PathAddBackslashA(lpszPath);
62 /*************************************************************************
63 * PathBuildRootAW [SHELL32.30]
65 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive)
67 if(SHELL_OsIsUnicode())
68 return PathBuildRootW(lpszPath, drive);
69 return PathBuildRootA(lpszPath, drive);
73 Extracting Component Parts
76 /*************************************************************************
77 * PathFindFileNameAW [SHELL32.34]
79 LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath)
81 if(SHELL_OsIsUnicode())
82 return PathFindFileNameW(lpszPath);
83 return PathFindFileNameA(lpszPath);
86 /*************************************************************************
87 * PathFindExtensionAW [SHELL32.31]
89 LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath)
91 if (SHELL_OsIsUnicode())
92 return PathFindExtensionW(lpszPath);
93 return PathFindExtensionA(lpszPath);
97 /*************************************************************************
98 * PathGetExtensionA [internal]
101 * exported by ordinal
102 * return value points to the first char after the dot
104 static LPSTR PathGetExtensionA(LPCSTR lpszPath)
106 TRACE("(%s)\n",lpszPath);
108 lpszPath = PathFindExtensionA(lpszPath);
109 return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath);
112 /*************************************************************************
113 * PathGetExtensionW [internal]
115 static LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
117 TRACE("(%s)\n",debugstr_w(lpszPath));
119 lpszPath = PathFindExtensionW(lpszPath);
120 return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath);
123 /*************************************************************************
124 * PathGetExtensionAW [SHELL32.158]
126 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath)
128 if (SHELL_OsIsUnicode())
129 return PathGetExtensionW(lpszPath);
130 return PathGetExtensionA(lpszPath);
133 /*************************************************************************
134 * PathGetArgsAW [SHELL32.52]
136 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
138 if (SHELL_OsIsUnicode())
139 return PathGetArgsW(lpszPath);
140 return PathGetArgsA(lpszPath);
143 /*************************************************************************
144 * PathGetDriveNumber [SHELL32.57]
146 int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
148 if (SHELL_OsIsUnicode())
149 return PathGetDriveNumberW(lpszPath);
150 return PathGetDriveNumberA(lpszPath);
153 /*************************************************************************
154 * PathRemoveFileSpec [SHELL32.35]
156 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
158 if (SHELL_OsIsUnicode())
159 return PathRemoveFileSpecW(lpszPath);
160 return PathRemoveFileSpecA(lpszPath);
163 /*************************************************************************
164 * PathStripPathAW [SHELL32.38]
166 void WINAPI PathStripPathAW(LPVOID lpszPath)
168 if (SHELL_OsIsUnicode())
169 return PathStripPathW(lpszPath);
170 return PathStripPathA(lpszPath);
173 /*************************************************************************
174 * PathStripToRootAW [SHELL32.50]
176 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
178 if (SHELL_OsIsUnicode())
179 return PathStripToRootW(lpszPath);
180 return PathStripToRootA(lpszPath);
183 /*************************************************************************
184 * PathRemoveArgsAW [SHELL32.251]
186 void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
188 if (SHELL_OsIsUnicode())
189 PathRemoveArgsW(lpszPath);
190 PathRemoveArgsA(lpszPath);
193 /*************************************************************************
194 * PathRemoveExtensionAW [SHELL32.250]
196 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath)
198 if (SHELL_OsIsUnicode())
199 return PathRemoveExtensionW(lpszPath);
200 return PathRemoveExtensionA(lpszPath);
208 /*************************************************************************
209 * PathGetShortPathA [internal]
211 LPSTR WINAPI PathGetShortPathA(LPSTR lpszPath)
213 FIXME("%s stub\n", lpszPath);
217 /*************************************************************************
218 * PathGetShortPathW [internal]
220 LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath)
222 FIXME("%s stub\n", debugstr_w(lpszPath));
226 /*************************************************************************
227 * PathGetShortPathAW [SHELL32.92]
229 LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath)
231 if(SHELL_OsIsUnicode())
232 return PathGetShortPathW(lpszPath);
233 return PathGetShortPathA(lpszPath);
236 /*************************************************************************
237 * PathRemoveBlanksAW [SHELL32.33]
239 void WINAPI PathRemoveBlanksAW(LPVOID str)
241 if(SHELL_OsIsUnicode())
242 PathRemoveBlanksW(str);
243 PathRemoveBlanksA(str);
246 /*************************************************************************
247 * PathQuoteSpacesAW [SHELL32.55]
249 LPVOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath)
251 if(SHELL_OsIsUnicode())
252 return PathQuoteSpacesW(lpszPath);
253 return PathQuoteSpacesA(lpszPath);
256 /*************************************************************************
257 * PathUnquoteSpacesAW [SHELL32.56]
259 VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
261 if(SHELL_OsIsUnicode())
262 PathUnquoteSpacesW(str);
264 PathUnquoteSpacesA(str);
267 /*************************************************************************
268 * PathParseIconLocationAW [SHELL32.249]
270 int WINAPI PathParseIconLocationAW (LPVOID lpszPath)
272 if(SHELL_OsIsUnicode())
273 return PathParseIconLocationW(lpszPath);
274 return PathParseIconLocationA(lpszPath);
278 ########## Path Testing ##########
280 /*************************************************************************
281 * PathIsUNCAW [SHELL32.39]
283 BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath)
285 if (SHELL_OsIsUnicode())
286 return PathIsUNCW( lpszPath );
287 return PathIsUNCA( lpszPath );
290 /*************************************************************************
291 * PathIsRelativeAW [SHELL32.40]
293 BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath)
295 if (SHELL_OsIsUnicode())
296 return PathIsRelativeW( lpszPath );
297 return PathIsRelativeA( lpszPath );
300 /*************************************************************************
301 * PathIsRootAW [SHELL32.29]
303 BOOL WINAPI PathIsRootAW(LPCVOID lpszPath)
305 if (SHELL_OsIsUnicode())
306 return PathIsRootW(lpszPath);
307 return PathIsRootA(lpszPath);
310 /*************************************************************************
311 * PathIsExeA [internal]
313 static BOOL PathIsExeA (LPCSTR lpszPath)
315 LPCSTR lpszExtension = PathGetExtensionA(lpszPath);
317 static char * lpszExtensions[6] = {"exe", "com", "pid", "cmd", "bat", NULL };
319 TRACE("path=%s\n",lpszPath);
321 for(i=0; lpszExtensions[i]; i++)
322 if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE;
327 /*************************************************************************
328 * PathIsExeW [internal]
330 static BOOL PathIsExeW (LPCWSTR lpszPath)
332 LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
334 static WCHAR lpszExtensions[6][4] =
335 {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'},
336 {'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} };
338 TRACE("path=%s\n",debugstr_w(lpszPath));
340 for(i=0; lpszExtensions[i]; i++)
341 if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
346 /*************************************************************************
347 * PathIsExeAW [SHELL32.43]
349 BOOL WINAPI PathIsExeAW (LPCVOID path)
351 if (SHELL_OsIsUnicode())
352 return PathIsExeW (path);
353 return PathIsExeA(path);
356 /*************************************************************************
357 * PathIsDirectoryAW [SHELL32.159]
359 BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
361 if (SHELL_OsIsUnicode())
362 return PathIsDirectoryW (lpszPath);
363 return PathIsDirectoryA (lpszPath);
366 /*************************************************************************
367 * PathFileExistsAW [SHELL32.45]
369 BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
371 if (SHELL_OsIsUnicode())
372 return PathFileExistsW (lpszPath);
373 return PathFileExistsA (lpszPath);
376 /*************************************************************************
377 * PathMatchSpecAW [SHELL32.46]
379 BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
381 if (SHELL_OsIsUnicode())
382 return PathMatchSpecW( name, mask );
383 return PathMatchSpecA( name, mask );
386 /*************************************************************************
387 * PathIsSameRootAW [SHELL32.650]
389 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2)
391 if (SHELL_OsIsUnicode())
392 return PathIsSameRootW(lpszPath1, lpszPath2);
393 return PathIsSameRootA(lpszPath1, lpszPath2);
396 /*************************************************************************
397 * IsLFNDriveA [SHELL32.119]
400 * exported by ordinal Name
402 BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath)
406 if (!GetVolumeInformationA(lpszPath,NULL,0,NULL,&fnlen,NULL,NULL,0))
412 ########## Creating Something Unique ##########
414 /*************************************************************************
415 * PathMakeUniqueNameA [internal]
417 BOOL WINAPI PathMakeUniqueNameA(
420 LPCSTR lpszShortName,
424 FIXME("%p %lu %s %s %s stub\n",
425 lpszBuffer, dwBuffSize, debugstr_a(lpszShortName),
426 debugstr_a(lpszLongName), debugstr_a(lpszPathName));
430 /*************************************************************************
431 * PathMakeUniqueNameW [internal]
433 BOOL WINAPI PathMakeUniqueNameW(
436 LPCWSTR lpszShortName,
437 LPCWSTR lpszLongName,
438 LPCWSTR lpszPathName)
440 FIXME("%p %lu %s %s %s stub\n",
441 lpszBuffer, dwBuffSize, debugstr_w(lpszShortName),
442 debugstr_w(lpszLongName), debugstr_w(lpszPathName));
446 /*************************************************************************
447 * PathMakeUniqueNameAW [SHELL32.47]
449 BOOL WINAPI PathMakeUniqueNameAW(
452 LPCVOID lpszShortName,
453 LPCVOID lpszLongName,
454 LPCVOID lpszPathName)
456 if (SHELL_OsIsUnicode())
457 return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
458 return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
461 /*************************************************************************
462 * PathYetAnotherMakeUniqueNameA [SHELL32.75]
465 * exported by ordinal
467 BOOL WINAPI PathYetAnotherMakeUniqueNameA(
470 LPCSTR lpszShortName,
473 FIXME("(%p,%p, %p ,%p):stub.\n",
474 lpszBuffer, lpszPathName, lpszShortName, lpszLongName);
480 ########## cleaning and resolving paths ##########
483 /*************************************************************************
484 * PathFindOnPathAW [SHELL32]
486 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
488 if (SHELL_OsIsUnicode())
489 return PathFindOnPathW(sFile, sOtherDirs);
490 return PathFindOnPathA(sFile, sOtherDirs);
493 /*************************************************************************
494 * PathCleanupSpecAW [SHELL32]
496 DWORD WINAPI PathCleanupSpecAW (LPVOID x, LPVOID y)
498 FIXME("(%p, %p) stub\n",x,y);
502 /*************************************************************************
503 * PathQualifyA [SHELL32]
505 BOOL WINAPI PathQualifyA(LPCSTR pszPath)
507 FIXME("%s\n",pszPath);
511 /*************************************************************************
512 * PathQualifyW [SHELL32]
514 BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
516 FIXME("%s\n",debugstr_w(pszPath));
520 /*************************************************************************
521 * PathQualifyAW [SHELL32]
523 BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
525 if (SHELL_OsIsUnicode())
526 return PathQualifyW(pszPath);
527 return PathQualifyA(pszPath);
530 /*************************************************************************
531 * PathResolveA [SHELL32.51]
533 BOOL WINAPI PathResolveA(
538 FIXME("(%s,%p,0x%08lx),stub!\n",
539 lpszPath, *alpszPaths, dwFlags);
543 /*************************************************************************
544 * PathResolveW [SHELL32]
546 BOOL WINAPI PathResolveW(
551 FIXME("(%s,%p,0x%08lx),stub!\n",
552 debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags);
556 /*************************************************************************
557 * PathResolveAW [SHELL32]
559 BOOL WINAPI PathResolveAW(
564 if (SHELL_OsIsUnicode())
565 return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags);
566 return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags);
569 /*************************************************************************
570 * PathProcessCommandA [SHELL32.653]
572 HRESULT WINAPI PathProcessCommandA (
578 FIXME("%s %p 0x%04lx 0x%04lx stub\n",
579 lpszPath, lpszBuff, dwBuffSize, dwFlags);
580 strcpy(lpszBuff, lpszPath);
584 /*************************************************************************
585 * PathProcessCommandW
587 HRESULT WINAPI PathProcessCommandW (
593 FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n",
594 debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags);
595 strcpyW(lpszBuff, lpszPath);
599 /*************************************************************************
600 * PathProcessCommandAW
602 HRESULT WINAPI PathProcessCommandAW (
608 if (SHELL_OsIsUnicode())
609 return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags);
610 return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags);
614 ########## special ##########
617 /*************************************************************************
618 * PathSetDlgItemPathAW
620 BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
621 { if (SHELL_OsIsUnicode())
622 return PathSetDlgItemPathW(hDlg, id, pszPath);
623 return PathSetDlgItemPathA(hDlg, id, pszPath);
627 /*************************************************************************
628 * SHGetSpecialFolderPathA [SHELL32.175]
630 * converts csidl to path
633 static char * szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
634 static char * szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
636 static char * szEnvUserProfile = "%USERPROFILE%";
637 static char * szEnvSystemRoot = "%SYSTEMROOT%";
640 BOOL WINAPI SHGetSpecialFolderPathA (
646 CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH];
648 BOOL bRelative = TRUE;
649 DWORD dwType, dwDisp, dwPathLen = MAX_PATH;
651 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
653 /* build default values */
657 hRootKey = HKEY_CURRENT_USER;
658 strcpy (szValueName, "AppData");
659 strcpy (szDefaultPath, "AppData");
663 hRootKey = HKEY_CURRENT_USER;
664 strcpy (szValueName, "Cookies");
665 strcpy(szDefaultPath, "Cookies");
668 case CSIDL_DESKTOPDIRECTORY:
669 hRootKey = HKEY_CURRENT_USER;
670 strcpy(szValueName, "Desktop");
671 strcpy(szDefaultPath, "Desktop");
674 case CSIDL_COMMON_DESKTOPDIRECTORY:
675 hRootKey = HKEY_LOCAL_MACHINE;
676 strcpy(szValueName, "Common Desktop");
677 strcpy(szDefaultPath, "Desktop");
680 case CSIDL_FAVORITES:
681 hRootKey = HKEY_CURRENT_USER;
682 strcpy(szValueName, "Favorites");
683 strcpy(szDefaultPath, "Favorites");
687 hRootKey = HKEY_CURRENT_USER;
688 strcpy(szValueName, "Fonts");
689 strcpy(szDefaultPath, "Fonts");
693 hRootKey = HKEY_CURRENT_USER;
694 strcpy(szValueName, "History");
695 strcpy(szDefaultPath, "History");
699 hRootKey = HKEY_CURRENT_USER;
700 strcpy(szValueName, "NetHood");
701 strcpy(szDefaultPath, "NetHood");
704 case CSIDL_INTERNET_CACHE:
705 hRootKey = HKEY_CURRENT_USER;
706 strcpy(szValueName, "Cache");
707 strcpy(szDefaultPath, "Temporary Internet Files");
711 hRootKey = HKEY_CURRENT_USER;
712 strcpy(szValueName, "Personal");
713 strcpy(szDefaultPath, "My Own Files");
717 case CSIDL_PRINTHOOD:
718 hRootKey = HKEY_CURRENT_USER;
719 strcpy(szValueName, "PrintHood");
720 strcpy(szDefaultPath, "PrintHood");
724 hRootKey = HKEY_CURRENT_USER;
725 strcpy(szValueName, "Programs");
726 strcpy(szDefaultPath, "Start Menu\\Programs");
729 case CSIDL_COMMON_PROGRAMS:
730 hRootKey = HKEY_LOCAL_MACHINE;
731 strcpy(szValueName, "Common Programs");
732 strcpy(szDefaultPath, "");
736 hRootKey = HKEY_CURRENT_USER;
737 strcpy(szValueName, "Recent");
738 strcpy(szDefaultPath, "Recent");
742 hRootKey = HKEY_CURRENT_USER;
743 strcpy(szValueName, "SendTo");
744 strcpy(szDefaultPath, "SendTo");
747 case CSIDL_STARTMENU:
748 hRootKey = HKEY_CURRENT_USER;
749 strcpy(szValueName, "Start Menu");
750 strcpy(szDefaultPath, "Start Menu");
753 case CSIDL_COMMON_STARTMENU:
754 hRootKey = HKEY_LOCAL_MACHINE;
755 strcpy(szValueName, "Common Start Menu");
756 strcpy(szDefaultPath, "Start Menu");
760 hRootKey = HKEY_CURRENT_USER;
761 strcpy(szValueName, "StartUp");
762 strcpy(szDefaultPath, "Start Menu\\Programs\\StartUp");
765 case CSIDL_COMMON_STARTUP:
766 hRootKey = HKEY_LOCAL_MACHINE;
767 strcpy(szValueName, "Common StartUp");
768 strcpy(szDefaultPath, "Start Menu\\Programs\\StartUp");
771 case CSIDL_TEMPLATES:
772 hRootKey = HKEY_CURRENT_USER;
773 strcpy(szValueName, "Templates");
774 strcpy(szDefaultPath, "ShellNew");
778 ERR("folder unknown or not allowed\n");
782 /* user shell folders */
783 if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
785 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
790 if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
792 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
795 /* value not existing */
798 GetWindowsDirectoryA(szPath, MAX_PATH);
799 PathAddBackslashA(szPath);
800 strcat(szPath, szDefaultPath);
804 strcpy(szPath, "C:\\"); /* fixme ??? */
805 strcat(szPath, szDefaultPath);
807 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
812 /* expand paths like %USERPROFILE% */
813 if (dwType == REG_EXPAND_SZ)
815 ExpandEnvironmentStringsA(szPath, szDefaultPath, MAX_PATH);
816 strcpy(szPath, szDefaultPath);
819 /* if we don't care about existing directorys we are ready */
820 if(csidl & CSIDL_FLAG_DONT_VERIFY) return TRUE;
822 if (PathFileExistsA(szPath)) return TRUE;
824 /* not existing but we not allowed to create it */
825 if (!bCreate) return FALSE;
827 if (!CreateDirectoryA(szPath,NULL))
829 ERR("Failed to create directory '%s'.\n", szPath);
833 MESSAGE("Created not existing system directory '%s'\n", szPath);
837 /*************************************************************************
838 * SHGetSpecialFolderPathW
840 BOOL WINAPI SHGetSpecialFolderPathW (
846 char szTemp[MAX_PATH];
848 if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate))
850 if (!MultiByteToWideChar( CP_ACP, 0, szTemp, -1, szPath, MAX_PATH ))
851 szPath[MAX_PATH-1] = 0;
854 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
859 /*************************************************************************
860 * SHGetSpecialFolderPathAW
862 BOOL WINAPI SHGetSpecialFolderPathAW (
869 if (SHELL_OsIsUnicode())
870 return SHGetSpecialFolderPathW (hwndOwner, szPath, csidl, bCreate);
871 return SHGetSpecialFolderPathA (hwndOwner, szPath, csidl, bCreate);
874 /*************************************************************************
875 * SHGetFolderPathA [SHFOLDER.@]
877 HRESULT WINAPI SHGetFolderPathA(
880 HANDLE hToken, /* [in] FIXME: get paths for specific user */
881 DWORD dwFlags, /* [in] FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */
884 return (SHGetSpecialFolderPathA(
887 CSIDL_FOLDER_MASK & nFolder,
888 CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL;
891 /*************************************************************************
892 * SHGetFolderPathW [SHFOLDER.@]
894 HRESULT WINAPI SHGetFolderPathW(
901 return (SHGetSpecialFolderPathW(
904 CSIDL_FOLDER_MASK & nFolder,
905 CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL;