Issue with SHGetFolderPath() and CSIDL_APPDATA under Windows 7

Discussion in 'Visual C++ .Net' started by Trips, Nov 18, 2010.

  1. Trips

    Trips Active Member

    Aug 7, 2010
    Likes Received:
    Trophy Points:
    Cyber Space
    In my application, I'm calling SHGetFolderPath() with CSIDL_APPDATA to get the Application Data folder path:
    Under WinXP, this returns C:Documents and Settings<username>Application Data<br/>
    Under Windows 7, the path is C:Users<username>AppDataRoaming
    Under Windows 7, when I save and open my files, I then have a path of C:Users<username>AppDataRoamingMyApplication
    Withing my application I'm able to save and open my files, but when I navigate to C:Users<username>AppDataRoamingMyApplication in Windows Explorer I only see a few of the files I've saved. It's very odd. Is there another location the
    files are being saved to? In my code, once I have the path I'm using FindFirstFile() and FindNextFile() to find the files in the directory. I have 20 or so files I've saved (and can load), but only 2 are appearing within the AppDataRoamingMyApplication
    folder in Win Explorer, so where are the files being stored?
    I tried searching for some recently saved files - a few of the files I've recently saved I've given unique filenames to, but searching with Windows Explorer I wasn't able to find them.

    View the full article

Share This Page