Files deleted by Vista can still be accessed by application, why?

I deleted some folders and files (only data and text files, no dlls nor exes) from my application installed in theProgram Files folder in Vista. I even removed the deleted folders and files from recycle bin and restarted the computer.

But my application can still have full access to the deleted folders and files. These deleted files can still be read, copied, moved, renamed, and deleted again in my applications as if they were not deleted at all.

Under these deleted files have already gone and there is no way you can get these files from VIsta Interface. In my application, all file functions such as fopen, FindFirstFile, GetFileAttributes can get full access to the files.

I restarted the computer. It is still the same. Very strange thing - only in Vista, not in XP.

Here is a side by side comparison of what Vista and my application display in their file browsers:

http://www.visviva.com/temp/browser3.jpg

I posted this question in VC forum and no one can explain this. Here is the original discussion thread in VC:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2185382&SiteID=1
[1471 byte] By [NJ] at [2008-1-10]
# 1

Windows applications shouldn't write to their Program Files directory as this is a protected location that only users with Administrative rights can modify. The enhanced security of Windows Vista prevents writing to this directory even when logged in as an Administrator unless code is running elevated by a UAC request.

To prevent legacy applications that rely on this behaviour working from breaking, Windows Vista virtualises writes by non-Vista aware applications to the Program Files directory into a per-user directory inside the user's profile. It is these files you are seeing in your application.

AndyCadley at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,General Windows Vista Development Issues...

Software Development for Windows Vista

Site Classified