From ae379a44fdf174124d8848ef096dbb22bb5a15c6 Mon Sep 17 00:00:00 2001 From: Paul Rupe Date: Mon, 17 Mar 2003 04:42:45 +0000 Subject: [PATCH] Add CSIDL_PROFILES. Improved logging for non-existent CSIDL values. --- dlls/shell32/shellpath.c | 12 +++++++++--- include/shlobj.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index d3275612b4f..844302c410f 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -995,6 +995,11 @@ static const CSIDL_DATA CSIDL_Data[] = 0, 0, /* FIXME */ NULL, NULL, + }, + { /* CSIDL_PROFILES */ + 0, 0, /* FIXME */ + NULL, + NULL, } }; #undef HKCU @@ -1017,14 +1022,15 @@ BOOL WINAPI SHGetSpecialFolderPathA ( TRACE("%p,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); - if ((folder > CSIDL_COMPUTERSNEARME) || (CSIDL_Data[folder].hRootKey == 0)) + if ((folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) || + (CSIDL_Data[folder].hRootKey == 0)) { - ERR("folder unknown or not allowed\n"); + ERR("folder 0x%04lx unknown or not allowed\n", folder); return FALSE; } if (CSIDL_Data[folder].hRootKey == (HKEY)1) { - FIXME("folder unknown, please add.\n"); + FIXME("folder 0x%04lx unknown, please add.\n", folder); return FALSE; } diff --git a/include/shlobj.h b/include/shlobj.h index 1e49a6e480a..37b4a84f7b5 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -566,6 +566,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND, INT, LPITEMIDLIST *); #define CSIDL_COMMON_OEM_LINKS 0x003a #define CSIDL_CDBURN_AREA 0x003b #define CSIDL_COMPUTERSNEARME 0x003d +#define CSIDL_PROFILES 0x003e #define CSIDL_FOLDER_MASK 0x00ff #define CSIDL_FLAG_PER_USER_INIT 0x0800 #define CSIDL_FLAG_NO_ALIAS 0x1000