How to set working directory to MyPictures?
-
Using Win32/VC++, I want to scan the users My Pictures folder (and potentially any other user/system folder using:
g_hFind= FindFirstFile( "*.jpg", &g_FindFileData);
andFindNextFile(g_hFind, &g_FindFileData) )
How do I set the "working" folder so that I don't need to include the path name as part of the file path?hr = SHGetSpecialFolderLocation(0, CSIDL_COMMON_PICTURES, &pidlDocFiles);
Thanks in advance, If you're interested, read more of what I have to say my DirectX9 site. - Segment Fault -
Using Win32/VC++, I want to scan the users My Pictures folder (and potentially any other user/system folder using:
g_hFind= FindFirstFile( "*.jpg", &g_FindFileData);
andFindNextFile(g_hFind, &g_FindFileData) )
How do I set the "working" folder so that I don't need to include the path name as part of the file path?hr = SHGetSpecialFolderLocation(0, CSIDL_COMMON_PICTURES, &pidlDocFiles);
Thanks in advance, If you're interested, read more of what I have to say my DirectX9 site. - Segment Fault -
Using Win32/VC++, I want to scan the users My Pictures folder (and potentially any other user/system folder using:
g_hFind= FindFirstFile( "*.jpg", &g_FindFileData);
andFindNextFile(g_hFind, &g_FindFileData) )
How do I set the "working" folder so that I don't need to include the path name as part of the file path?hr = SHGetSpecialFolderLocation(0, CSIDL_COMMON_PICTURES, &pidlDocFiles);
Thanks in advance, If you're interested, read more of what I have to say my DirectX9 site. - Segment FaultThink of a situation that the user changes that folder location (yes he can) while ur application is running. Your application will stop behaving properly if you have cached the path or set it as a default path. IMO, i wont do that.
-Prakash -- modified at 3:45 Wednesday 4th January, 2006
-
Think of a situation that the user changes that folder location (yes he can) while ur application is running. Your application will stop behaving properly if you have cached the path or set it as a default path. IMO, i wont do that.
-Prakash -- modified at 3:45 Wednesday 4th January, 2006
I think it is okay to ignore this case for all practical purposes. You will have the problem either way you do it: either change the current directory and relative file names, or get the location of My Pictures folder and use absolute name. When you are working on a directory and the directory has changes, the behaviour is unknown anyways. thanks!